robertdebock / ansible-role-users

The purpose of this role is to add users and groups on your system.
https://robertdebock.nl/
Apache License 2.0
42 stars 27 forks source link

Allow multiple sudo option lines per user #16

Closed i-mtz closed 3 years ago

i-mtz commented 3 years ago

Allow multiple sudo option lines per user

name: Pull request about: Extend the template so that users can specify multiple sudo option lines per user.


Describe the change Allow the sudo.j2 template to work with sudo_options being either a string like previous versions, or a list in case we need to define multiple sudo options for a single user.

Testing Tested by extending the current tests to test that the template generates a valid sudoers file for multiple sudo options (tests where already in place for a single option)

robertdebock commented 3 years ago

Looks like a very useful improvement. Let's wait for CI tests and approve/merge later.

Thanks for helping!