Skip to content

Commit 618eccc

Browse files
committed
CI: Set macOS failed logins limit of mitogen test users to 1000
refs #1315
1 parent 9e3377c commit 618eccc

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ In progress (unreleased)
2222
------------------------
2323

2424
* :gh:issue:`1329` CI: Refactor and de-duplicate Github Actions workflow
25+
* :gh:issue:`1315` CI: macOS: Increase failed logins limit of test users
2526

2627

2728
v0.3.26 (2025-08-04)

tests/image_prep/_user_accounts.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
mitogen_test_groups:
5151
- name: mitogen__group
5252
- name: mitogen__sudo_nopw
53-
tasks:
53+
54+
user_policies_max_failed_logins: 1000
55+
user_policies_users: "{{ all_users }}"
56+
pre_tasks:
5457
- name: Disable non-localhost SSH for Mitogen users
5558
when: false
5659
blockinfile:
@@ -180,3 +183,5 @@
180183
validate: '/usr/sbin/visudo -cf %s'
181184
when:
182185
- ansible_virtualization_type != "docker"
186+
roles:
187+
- role: user_policies
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
user_policies_max_failed_logins: 10
2+
user_policies_users: []
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- name: Set login attempts (macOS)
2+
vars:
3+
max_failed_logins: "{{ item.policies.max_failed_logins | default(user_policies_max_failed_logins) }}"
4+
command: >
5+
pwpolicy
6+
-u '{{ item.name }}'
7+
-setpolicy 'maxFailedLoginAttempts={{ max_failed_logins }}'
8+
with_items: "{{ user_policies_users }}"
9+
when:
10+
- ansible_system == 'Darwin'
11+
changed_when: true

0 commit comments

Comments
 (0)