Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - hosts: localhost
- gather_facts: no
- tasks:
- - stat:
- path: >-
- {{item}}
- with_items:
- - /etc/FOO
- - /etc/hosts
- register: o
- - debug:
- msg: >
- {{ o.results
- | selectattr("stat.exists", "equalto", true)
- | map(attribute="item")
- | first
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement