Skip hushlogin creation if it already exists
This commit is contained in:
parent
4c7c0d9e40
commit
ed40dfba54
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,11 @@
|
||||||
---
|
---
|
||||||
|
- name: Check if hushlogin exists
|
||||||
|
register: hushlogin_stat
|
||||||
|
stat:
|
||||||
|
path: ~/.hushlogin
|
||||||
|
|
||||||
- name: Create hushlogin
|
- name: Create hushlogin
|
||||||
|
when: hushlogin_stat.stat.exists == false
|
||||||
file:
|
file:
|
||||||
state: touch
|
state: touch
|
||||||
path: ~/.hushlogin
|
path: ~/.hushlogin
|
||||||
|
|
Loading…
Add table
Reference in a new issue