playbooks/test.yml

12 lines
304 B
YAML
Raw Normal View History

2024-05-11 19:10:55 +03:30
---
- 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'