You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/examples/playbooks/loop_plugins.yml

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