Skip hushlogin creation if it already exists

This commit is contained in:
Fernando Schauenburg 2019-11-15 21:35:19 +00:00
parent 4c7c0d9e40
commit ed40dfba54

View file

@ -1,5 +1,11 @@
---
- name: Check if hushlogin exists
register: hushlogin_stat
stat:
path: ~/.hushlogin
- name: Create hushlogin
when: hushlogin_stat.stat.exists == false
file:
state: touch
path: ~/.hushlogin