File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 8484 with_items : " {{all_users}}"
8585 when : ansible_system == 'Darwin'
8686
87- - name : Hide users from login window.
88- with_items : " {{all_users}}"
87+ - name : Hide users from login window (Darwin).
8988 when : ansible_system == 'Darwin'
89+ with_items : " {{all_users}}"
9090 osx_defaults :
9191 array_add : true
9292 domain : /Library/Preferences/com.apple.loginwindow
9393 type : array
9494 key : HiddenUsersList
9595 value : ['mitogen_{{item}}']
9696
97+ - name : Check if AccountsService is used
98+ file :
99+ path : /var/lib/AccountsService/users
100+ register : out
101+
102+ - name : Hide users from login window (Linux).
103+ when : ansible_system == 'Linux' and out.stat.exists
104+ with_items : " {{all_users}}"
105+ copy :
106+ dest : /var/lib/AccountsService/users/mitogen__{{item}}
107+ content : |
108+ [User]
109+ SystemAccount=true
110+
111+ - name : Restart AccountsService (Linux).
112+ when : ansible_system == 'Linux' and out.stat.exists
113+ service :
114+ name : accounts-daemon
115+ restarted : true
116+
97117 - name : Readonly homedir for one account
98118 shell : " chown -R root: ~mitogen__readonly_homedir"
99119
You can’t perform that action at this time.
0 commit comments