DEV Community 👩‍💻👨‍💻


Posted on

ansible create empty file if it does not exist

- name: Touch again the same file, but do not change times this makes the task idempotent
    path: /etc/foo.conf
    state: touch
    mode: u+rw,g-wx,o-rwx
    modification_time: preserve
    access_time: preserve
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Make Your Github Profile Stand Out

Github is great, but have you considered how to make yours more attractive for potential employers or other visitors? Even non-tech ones like recruiters!

Take a couple of hours and show your best side as a person - and a programmer.