Closed markgraf closed 3 years ago
Describe the change Added validation of the templated changes to a sudoers.d-file. This prevents locking yourself out of your server if there's a typo in your sudo_options. The change is taken from the official documentation at https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html
Testing Successfully converged the role with the change. Failed as expected when passing bogus options for sudo.
The failed CI is not your problem, I'll merge and fix CI.
Thanks for the helpful contribution!
Validate files in sudoers.d
name: Pull request about: Validate files in /etc/sudoers.d/ before writing them.
Describe the change Added validation of the templated changes to a sudoers.d-file. This prevents locking yourself out of your server if there's a typo in your sudo_options. The change is taken from the official documentation at https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html
Testing Successfully converged the role with the change. Failed as expected when passing bogus options for sudo.