summaryrefslogtreecommitdiff
path: root/ansible-practice/06-playbook-create-multiple-files.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible-practice/06-playbook-create-multiple-files.yml')
-rw-r--r--ansible-practice/06-playbook-create-multiple-files.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/ansible-practice/06-playbook-create-multiple-files.yml b/ansible-practice/06-playbook-create-multiple-files.yml
new file mode 100644
index 0000000..3a6284b
--- /dev/null
+++ b/ansible-practice/06-playbook-create-multiple-files.yml
@@ -0,0 +1,19 @@
+# create multiple empty files
+# https://phoenixnap.com/kb/ansible-create-file
+
+---
+- name: "06 - Playing with Ansible - create multiple empty files"
+ hosts: all
+# hosts: localhost
+# connection: local
+ tasks:
+ - name: Create multiple files
+ file:
+ path: "~/{{ item }}"
+ state: touch
+ with_items:
+ - ansible_created_file-03.txt
+ - ansible_created_file-04.txt
+ - ansible_created_file-05.txt
+ - ansible_created_file-06.txt
+... \ No newline at end of file