On Apr 20, 2017, at 9:27 AM,
fatimazahr...@gmail.com wrote:
> TASK [Getting config ... please wait] ******************************************
> fatal: [aa.bb.cc.dd]: FAILED! => {"changed": false, "failed": true, "msg": "Uncaught exception - please report: [Errno 2] No such file or directory: 'etc/ansible/Backups/aa.bb.cc.dd.conf'"}
> to retry, use: --limit @/etc/ansible/playbooks/test.retry
>
> I don't know why I have this error even if the Backups directory exists :(
In your playbook you have:
dest=etc/ansible/Backups/{{ inventory_hostname }}.conf
Because the path doesn't start with a /, it's relative to the playbook directory. I expect you meant for this to be an absolute path, so change it to:
dest=/etc/ansible/Backups/{{ inventory_hostname }}.conf
You also need to make sure that the /etc/ansible/Backups path exists and is writeable by the user running the playbook.
--Stacy