ansible/examples/playbooks/loop_plugins.yml
2012-10-12 21:39:35 -04:00

20 lines
588 B
YAML

---
# 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
# see lib/ansible/runner/lookup_plugins/fileglob.py -- they can do basically anything!
- hosts: all
gather_facts: False
tasks:
# this will copy a bunch of config files over -- dir must be created first
- file: dest=/etc/fooapp state=directory
- copy: src=$item dest=/etc/fooapp/ owner=root mode=600
with_fileglob: /playbooks/files/fooapp/*