mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
chore(user): inline sudoers template
This commit is contained in:
parent
ab0e56e09a
commit
63480b4b87
2 changed files with 7 additions and 7 deletions
|
@ -23,8 +23,13 @@
|
|||
tags: ['deploy', 'deploy-users']
|
||||
|
||||
- name: "Template sudoers.d managed file"
|
||||
ansible.builtin.template:
|
||||
src: "sudoers.j2"
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
{% for name, attrs in users.items() %}
|
||||
{% if attrs.root | default(false) and attrs.active | default(false) %}
|
||||
{{ name }} ALL=(ALL) NOPASSWD:ALL
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
dest: "/etc/sudoers.d/{{ users_sudo_namespace }}"
|
||||
owner: "root"
|
||||
mode: "0440"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{% for name, attrs in users.items() %}
|
||||
{% if attrs.root | default(false) and attrs.active | default(false) %}
|
||||
{{ name }} ALL=(ALL) NOPASSWD:ALL
|
||||
{% endif %}
|
||||
{% endfor %}
|
Loading…
Reference in a new issue