fix: conditionally enable groups append to avoid warnings
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
31fa160f4e
commit
19a41eb843
@ -10,7 +10,7 @@
|
||||
user:
|
||||
name: "{{ item.name }}"
|
||||
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
||||
append: yes
|
||||
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 }}"
|
||||
shell: "{{ item.shell | default('/bin/bash') }}"
|
||||
loop: "{{ users_default_users }}"
|
||||
|
@ -13,7 +13,7 @@
|
||||
user:
|
||||
name: "{{ item.name }}"
|
||||
groups: "{{ item.groups | default([]) | join(',') or omit }}"
|
||||
append: yes
|
||||
append: "{{ True if (item.groups | default([]) | length > 0) else False }}"
|
||||
password: "{{ item.password | default(omit) | password_hash('sha512',65534 | random(seed=inventory_hostname) | string) }}"
|
||||
shell: "{{ item.shell | default('/bin/bash') }}"
|
||||
system: 'yes'
|
||||
|
Loading…
Reference in New Issue
Block a user