|
|
@ -84,9 +84,9 @@
|
|
|
|
with_items: "{{all_users}}"
|
|
|
|
with_items: "{{all_users}}"
|
|
|
|
when: ansible_system == 'Darwin'
|
|
|
|
when: ansible_system == 'Darwin'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Hide users from login window.
|
|
|
|
- name: Hide users from login window (Darwin).
|
|
|
|
with_items: "{{all_users}}"
|
|
|
|
|
|
|
|
when: ansible_system == 'Darwin'
|
|
|
|
when: ansible_system == 'Darwin'
|
|
|
|
|
|
|
|
with_items: "{{all_users}}"
|
|
|
|
osx_defaults:
|
|
|
|
osx_defaults:
|
|
|
|
array_add: true
|
|
|
|
array_add: true
|
|
|
|
domain: /Library/Preferences/com.apple.loginwindow
|
|
|
|
domain: /Library/Preferences/com.apple.loginwindow
|
|
|
@ -94,6 +94,26 @@
|
|
|
|
key: HiddenUsersList
|
|
|
|
key: HiddenUsersList
|
|
|
|
value: ['mitogen_{{item}}']
|
|
|
|
value: ['mitogen_{{item}}']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if AccountsService is used
|
|
|
|
|
|
|
|
file:
|
|
|
|
|
|
|
|
path: /var/lib/AccountsService/users
|
|
|
|
|
|
|
|
register: out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Hide users from login window (Linux).
|
|
|
|
|
|
|
|
when: ansible_system == 'Linux' and out.stat.exists
|
|
|
|
|
|
|
|
with_items: "{{all_users}}"
|
|
|
|
|
|
|
|
copy:
|
|
|
|
|
|
|
|
dest: /var/lib/AccountsService/users/mitogen__{{item}}
|
|
|
|
|
|
|
|
content: |
|
|
|
|
|
|
|
|
[User]
|
|
|
|
|
|
|
|
SystemAccount=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restart AccountsService (Linux).
|
|
|
|
|
|
|
|
when: ansible_system == 'Linux' and out.stat.exists
|
|
|
|
|
|
|
|
service:
|
|
|
|
|
|
|
|
name: accounts-daemon
|
|
|
|
|
|
|
|
restarted: true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Readonly homedir for one account
|
|
|
|
- name: Readonly homedir for one account
|
|
|
|
shell: "chown -R root: ~mitogen__readonly_homedir"
|
|
|
|
shell: "chown -R root: ~mitogen__readonly_homedir"
|
|
|
|
|
|
|
|
|
|
|
|