chore: disable passwords by default if empty
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5a08723238
commit
84f59382c1
@ -11,7 +11,7 @@
|
|||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
||||||
append: "{{ True if (item.groups | default([]) | length > 0) else False }}"
|
append: "{{ True if (item.groups | default([]) | length > 0) else False }}"
|
||||||
password: "{{ item.password | password_hash('sha512',65534 | random(seed=inventory_hostname) | string) if item.password is defined else omit }}"
|
password: "{{ item.password | password_hash('sha512',65534 | random(seed=inventory_hostname) | string) if item.password is defined else '*' }}"
|
||||||
password_expire_min: "{{ item.password_expire_min | default(users_pass_min_day) }}"
|
password_expire_min: "{{ item.password_expire_min | default(users_pass_min_day) }}"
|
||||||
shell: "{{ item.shell | default('/bin/bash') }}"
|
shell: "{{ item.shell | default('/bin/bash') }}"
|
||||||
loop: "{{ users_default_users }}"
|
loop: "{{ users_default_users }}"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
||||||
append: "{{ True if (item.groups | default([]) | length > 0) else False }}"
|
append: "{{ True if (item.groups | default([]) | length > 0) else False }}"
|
||||||
password: "{{ item.password | default(omit) | password_hash('sha512',65534 | random(seed=inventory_hostname) | string) }}"
|
password: "{{ item.password | password_hash('sha512',65534 | random(seed=inventory_hostname) | string) if item.password is defined else '*' }}"
|
||||||
password_expire_min: "{{ item.password_expire_min | default(users_pass_min_day) }}"
|
password_expire_min: "{{ item.password_expire_min | default(users_pass_min_day) }}"
|
||||||
shell: "{{ item.shell | default('/bin/bash') }}"
|
shell: "{{ item.shell | default('/bin/bash') }}"
|
||||||
system: "yes"
|
system: "yes"
|
||||||
|
Loading…
Reference in New Issue
Block a user