- name: Touch again the same file, but do not change times this makes the task idempotent
ansible.builtin.file:
path: /etc/foo.conf
state: touch
mode: u+rw,g-wx,o-rwx
modification_time: preserve
access_time: preserve
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Templates are files that contain text that can be dynamically generated using variables and other expressions
The template module has a number of options that can be used to control the behavior of the module.
2 ways to create a file in ansible