forked from LibreSchool/server-config
21 lines
655 B
YAML
21 lines
655 B
YAML
|
---
|
||
|
# Password policy
|
||
|
|
||
|
- name: Check for password policy
|
||
|
shell: /sbin/e-smith/db configuration printprop passwordstrength Users
|
||
|
register: chk_passstr
|
||
|
changed_when: "'Users=none' not in chk_passstr.stdout"
|
||
|
ignore_errors: true
|
||
|
tags: password-policy
|
||
|
|
||
|
- name: Configuring password policy
|
||
|
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none Admin strong MaxPassAge 180 MinPassAge 0 PassExpires no PassWarning 7
|
||
|
when: chk_passstr|changed
|
||
|
tags: password-policy
|
||
|
|
||
|
- name: Activating password policy
|
||
|
shell: /sbin/e-smith/signal-event password-policy-update
|
||
|
when: chk_passstr|changed
|
||
|
tags: password-policy
|
||
|
|