ansible: Is there something like with_fileglobs for files on remote machine?
问题 I'm trying to turn these lines into something I can put in an ansible playbook: # Install Prezto files shopt -s extglob shopt -s nullglob files=( "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/!(README.md) ) for rcfile in "${files[@]}"; do [[ -f $rcfile ]] && ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile##*/}" done So far I've got the following: - name: Link Prezto files file: src={{ item }} dest=~ state=link with_fileglob: - ~/.zprezto/runcoms/z* I know it isn't the same, but it would select the same