fix(sudo): use explicit string check instead of bool conditional for sudo field
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
validate: /usr/sbin/visudo --check --file=%s
|
||||
|
||||
- name: Deploy per-user sudoers rules
|
||||
when: item.value.sudo | default(false)
|
||||
when: item.value.sudo is defined and (item.value.sudo | string | length > 0)
|
||||
vars:
|
||||
configuration_sudoers_rule: >-
|
||||
{{ item.value.sudo if item.value.sudo is string else 'ALL=(ALL) NOPASSWD: ALL' }}
|
||||
|
||||
Reference in New Issue
Block a user