with_first_found.yml 189 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
- hosts: localhost
  connection: local
  gather_facts: no
  tasks:
  - debug: msg="file is {{item}}"
    with_first_found:
    - /etc/foo
    - /etc/bar
    - /etc/passwd
    - /etc/shadow