CI: Use native Ansible support to hide macOS users

This commit is contained in:
Alex Willmer 2025-02-07 00:16:57 +00:00
parent 5283e6756b
commit 11d2d70fd8
1 changed files with 1 additions and 10 deletions

View File

@ -86,20 +86,11 @@
['com.apple.access_ssh'] +
(user_groups[item.name] | default(['mitogen__group']))
}}
hidden: true
password: "{{ password }}"
with_items: "{{all_users}}"
when: ansible_system == 'Darwin'
- name: Hide users from login window (Darwin).
when: ansible_system == 'Darwin'
with_items: "{{all_users}}"
osx_defaults:
array_add: true
domain: /Library/Preferences/com.apple.loginwindow
type: array
key: HiddenUsersList
value: ['{{ item.name }}']
- name: Check if AccountsService is used
stat:
path: /var/lib/AccountsService/users