Closed jkirk closed 2 months ago
I just reviewed the configuration and found this line:
https://github.com/robertdebock/ansible-role-users/blob/0775839ddef908c0bb66006761ec978e50547907/templates/sudo_group.j2#L4
According to the sudoers(5) man page, a group is prefixed with a single '%' (see the section Aliases > User ::=).
Aliases
User ::=
Is that a typo or am I reading it wrong or does it mean something else?
I tried something like this:
roles: - role: robertdebock.users users_groups: - name: mygroup sudo_options: ["ALL=NOPASSWD: ALL"] users: - name: 'myuser' group: mygroup
Which creates this /etc/sudoers.d/mygroup:
/etc/sudoers.d/mygroup
# # HEADER: managed by ansible, do NOT edit manually! # %%mygroup ALL=NOPASSWD: ALL
I don't think this is correct, or?
FTR, i worked around this, by using this line:
sudo_options: "%mygroup ALL=NOPASSWD: ALL"
You are correct, I'm not sure where the double % came from, let me change it to a single one.
%
I just reviewed the configuration and found this line:
https://github.com/robertdebock/ansible-role-users/blob/0775839ddef908c0bb66006761ec978e50547907/templates/sudo_group.j2#L4
According to the sudoers(5) man page, a group is prefixed with a single '%' (see the section
Aliases
>User ::=
).Is that a typo or am I reading it wrong or does it mean something else?
I tried something like this:
Which creates this
/etc/sudoers.d/mygroup
:I don't think this is correct, or?
FTR, i worked around this, by using this line: