summaryrefslogtreecommitdiff
path: root/ansible-practice/05-playbook-add-content-to-created-file.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible-practice/05-playbook-add-content-to-created-file.yml')
-rw-r--r--ansible-practice/05-playbook-add-content-to-created-file.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/ansible-practice/05-playbook-add-content-to-created-file.yml b/ansible-practice/05-playbook-add-content-to-created-file.yml
new file mode 100644
index 0000000..de3fdb6
--- /dev/null
+++ b/ansible-practice/05-playbook-add-content-to-created-file.yml
@@ -0,0 +1,16 @@
+# creating a file w/ content
+# https://phoenixnap.com/kb/ansible-create-file
+
+---
+- name: "05 - Playing with Ansible - creating a file w/ content"
+# hosts: all
+ hosts: localhost
+ connection: local
+ tasks:
+ - name: Creating a file with content
+ copy:
+ dest: "~/ansible_created_file-02.txt"
+ content: |
+ line 01
+ line 02
+... \ No newline at end of file