File: main.yml

package info (click to toggle)
python-mitogen 0.3.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,732 kB
  • sloc: python: 24,733; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (20 lines) | stat: -rw-r--r-- 608 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- name: Set global login attempts (macOS)
  command:
    pwpolicy
    -n /Local/Default
    -setglobalpolicy 'maxFailedLoginAttempts={{ user_policies_max_failed_logins }}'
  when:
    - ansible_system == 'Darwin'
  changed_when: true

- name: Set user login attempts (macOS)
  vars:
    max_failed_logins: "{{ item.policies.max_failed_logins | default(user_policies_max_failed_logins) }}"
  command: >
    pwpolicy
    -u '{{ item.name }}'
    -setpolicy 'maxFailedLoginAttempts={{ max_failed_logins }}'
  with_items: "{{ user_policies_users }}"
  when:
    - ansible_system == 'Darwin'
  changed_when: true