I am trying to do something like this:
- name: setup user home directories
synchronize: src=homes/{{item.username}} dest=/home/{{item.username}}
owner={{item.username}}
group={{item.username}}
with_items: ssh_users
ignore_errors: yes
So basically, I want it to copy a home directory for users that have one. Not everyone will have one because not everyone really needs, say, their own customized .vimrc, etc. In those cases, I’d like Ansible to just skip it. But I don’t know how to do that. Running the above gives me:
TASK: […/users | setup user home directories] ********************************
fatal: [default] => input file not found at //roles/users/files/homes/ or /roles/users/homes/
FATAL: all hosts have already failed – aborting
This looks a bit like this bug, https://github.com/ansible/ansible/issues/7354 but they aren’t doing exactly the same thing I was trying to do.
This was all in 1.7.1.
Any ideas or suggestions?
Thanks!
Tim