Created
October 2, 2017 03:33
-
-
Save xbalaji/7124d1b71482a1211ee5b6e10ff6c497 to your computer and use it in GitHub Desktop.
Ansible create multiple directories
This file contains hidden or 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: all | |
vars: | |
tmp_dir: "/tmp/ansible-test" | |
tasks: | |
- name: create directories | |
file: | |
path: "{{tmp_dir}}/{{item}}" | |
state: directory | |
with_items: ["etc", "opt", "log" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment