Hi, I have the following task:

- ansible.builtin.copy:
src: "{{ item }}"
dest: /tmp/
with_fileglob: "files/tmp/{{ inventory_hostname }}/*.yaml"

Directory files/tmp/bar/ contains yaml files for host *bar*.
Directory files/tmp/foo/ doesn't exist because host *foo* should not 
receive any files with this task.

If I run this task on hosts *bar* and *foo*, I always get a warning:
[WARNING]: Unable to find 'files/tmp/foo' in expected paths (use -vvvvv to 
see paths)

I added a condition:
when: inventory_hostname == "bar"

and even wrapped the above task in a *block* with the above mentioned when 
condition, 
but I always get the warning.

Any idea how to stop the warning?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fd101353-b255-488f-881e-ea9ab39d2066n%40googlegroups.com.

Reply via email to