Ansible send file to the first met destination
问题 I'm sending a config file for thousands of nodes, because of some customisation there's maybe 5 or 6 paths to that file (There's only one file for host but the path can vary) and there isn't a easy way to figure out the default location with facts. Based on this, I'm looking for some way to set the "dest" of copy module like we can set the "src", with a with_first_found loop. Something like that: copy: src=/foo/{{ ansible_hostname }}/nrpe.cfg dest="{{item}} with_items: - "/etc/nagios/nrpe.cfg