|
|
|
@ -0,0 +1,12 @@
|
|
|
|
|
---
|
|
|
|
|
- name: Create a file in /root directory
|
|
|
|
|
hosts: all
|
|
|
|
|
# become: yes # This is necessary to gain root privileges
|
|
|
|
|
tasks:
|
|
|
|
|
- name: Ensure test.txt exists in /root directory
|
|
|
|
|
file:
|
|
|
|
|
path: /root/test.txt
|
|
|
|
|
state: touch
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: '0644'
|