http://docs.ansible.com/ansible/intro_inventory.html
http://yteraoka.github.io/ansible-tutorial/
copy
Files modules — Ansible Documentation
ansible ディレクトリ削除
http://blog.withsin.net/2014/12/22/ansible-remove-directory/
src は、配布元サーバにある ファイルを絶対パスまたは yaml ファイルからの相対パスで指定する。 hosts は ...
notify
handler が実行されるタイミングは対象の task 実行後ではなく、 Playbook の最後になります。
また、複数の task から同じ handler が notify されていた場合でも一度だけしか実行されません。
- name: template configuration file template: src=template.j2 dest=/etc/foo.conf notify: - restart memcached - restart apache
複数のタスクをループさせる
includeもまたwith_itemsでループ可能です。 したがって、次のように記述すればinner-tasks.ymlが2回実行されます。
- include: inner-tasks.yml with_items: - hoge - huga