Skip to content

Commit d27275a

Browse files
committed
ci: Set global max failed logins on macOS
1 parent 1b00ca2 commit d27275a

File tree

1 file changed

+10
-1
lines changed
  • tests/image_prep/roles/user_policies/tasks

1 file changed

+10
-1
lines changed

tests/image_prep/roles/user_policies/tasks/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
- name: Set login attempts (macOS)
1+
- name: Set global login attempts (macOS)
2+
command:
3+
pwpolicy
4+
-n /Local/Default
5+
-setglobalpolicy 'maxFailedLoginAttempts={{ user_policies_max_failed_logins }}'
6+
when:
7+
- ansible_system == 'Darwin'
8+
changed_when: true
9+
10+
- name: Set user login attempts (macOS)
211
vars:
312
max_failed_logins: "{{ item.policies.max_failed_logins | default(user_policies_max_failed_logins) }}"
413
command: >

0 commit comments

Comments
 (0)