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