Created
August 19, 2013 05:21
-
-
Save hnakamur/6265936 to your computer and use it in GitHub Desktop.
First add localhost to your inventory file (ex. /etc/ansible/hosts or ~/.ansible/hosts) and then run ansible-playbook ansible-directories.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
vars: | |
role: common | |
tasks: | |
- name: create directories for ansible files. | |
file: path={{ item }} state=directory | |
with_items: | |
- group_vars | |
- host_vars | |
- roles/{{ role }}/tasks | |
- roles/{{ role }}/handlers | |
- roles/{{ role }}/templates | |
- roles/{{ role }}/files | |
- roles/{{ role }}/vars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ありがとうございます。私の実行例もrole→rolesに編集しました。