Skip to content

Instantly share code, notes, and snippets.

@xbalaji
Created October 2, 2017 03:33
Show Gist options
  • Save xbalaji/7124d1b71482a1211ee5b6e10ff6c497 to your computer and use it in GitHub Desktop.
Save xbalaji/7124d1b71482a1211ee5b6e10ff6c497 to your computer and use it in GitHub Desktop.
Ansible create multiple directories
---
- 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