Is the host web3
a recent Debian/Ubuntu server where /bin/sh
is actually dash? The bracket expansion is not supported by it. You might need to specify executable
option to shell module.
$ ansible -i localhost, all -m shell -a 'ls /var/log/syslog.{2..4}.gz'
localhost | FAILED | rc=2 >>
ls: cannot access /var/log/syslog.{2..4}.gz: No such file or directory
$ ansible -i localhost, all -m shell -a 'ls /var/log/syslog.{2..4}.gz executable=/bin/bash'
localhost | success | rc=0 >>
/var/log/syslog.2.gz
/var/log/syslog.3.gz
/var/log/syslog.4.gz