Files
ansibleclass/01_linux.yml
2023-06-12 14:32:31 +02:00

18 lines
333 B
YAML

---
- name: First Playbook
hosts: linuxservers
become: true
tasks:
- name: Create file
ansible.builtin.file:
path: /root/testfile.txt
state: touch
mode: '0755'
- name: Add line in file
ansible.builtin.lineinfile:
path: /root/testfile.txt
line: Ansible was here...