1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/examples/playbooks/loop_plugins.yml

21 lines
588 B
YAML
Raw Normal View History

---
# in addition to loop_with_items, the loop that works over a variable, ansible can do more sophisticated looping.
# developer types: these are powered by 'lookup_plugins' should you ever decide to write your own
2012-10-13 03:35:33 +02:00
# see lib/ansible/runner/lookup_plugins/fileglob.py -- they can do basically anything!
- hosts: all
gather_facts: False
tasks:
2012-10-13 03:35:33 +02:00
# this will copy a bunch of config files over -- dir must be created first
2012-10-13 03:35:33 +02:00
- file: dest=/etc/fooapp state=directory
2012-10-13 03:35:33 +02:00
- copy: src=$item dest=/etc/fooapp/ owner=root mode=600
with_fileglob: /playbooks/files/fooapp/*