Skip to content

Instantly share code, notes, and snippets.

@rmn-lux
Created March 28, 2017 08:04
Show Gist options
  • Save rmn-lux/7e6caf6900353f9144af0d2125b673aa to your computer and use it in GitHub Desktop.
Save rmn-lux/7e6caf6900353f9144af0d2125b673aa to your computer and use it in GitHub Desktop.
elegant method for create files in Ansible
- name: ensure file exists
copy:
content: ""
dest: /etc/nologin
force: no
group: sys
owner: root
mode: 0555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment