1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/modules
Jon Ellis 97c72f88b7
Sudoers validate (#4794)
* Use visudo to validate sudoers rules before use

* Replace use of subprocess.Popen with module.run_command

* Switch out apt for package

* Check file mode when verifying file to determine whether something needs to change

* Only install sudo package for debian and redhat environments (when testing)

* Attempt to install sudo on FreeBSD too

* Try just installing sudo for non-darwin machines

* Don't validate file ownership

* Attempt to install sudo on all platforms

* Revert "Attempt to install sudo on all platforms"

This reverts commit b9562a8916.

* Remove file permissions changes from this PR

* Add changelog fragment for 4794 sudoers validation

* Add option to control when sudoers validation is used

* Update changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add version_added to validation property

Co-authored-by: Felix Fontein <felix@fontein.de>

* Also validate failed sudoers validation error message

Co-authored-by: Felix Fontein <felix@fontein.de>

* Make visudo not executable instead of trying to delete it

* Update edge case validation

* Write invalid sudoers file to alternative path to avoid breaking sudo

* Don't try to remove or otherwise modify visudo on Darwin

* Update plugins/modules/system/sudoers.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Remove trailing extra empty line to appease sanity checker

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-21 12:41:24 +02:00
..
cloud Add scw_compute_private_network (#4727) 2022-06-15 08:07:02 +02:00
clustering consul: applied bugfix from issue (#4712) 2022-05-23 07:22:15 +02:00
database Fix sanity issues. (#4346) 2022-03-14 20:56:27 +01:00
files Document all filter and test plugins (#4597) 2022-05-02 07:25:45 +02:00
identity keycloak_realm: fix default groups and roles (#4241) (#4719) 2022-05-30 12:48:06 +02:00
monitoring New module alerta_customer (#4554) 2022-04-26 07:58:32 +02:00
net_tools nmcli: do not convert undefined lists to empty strings (#4813) 2022-06-13 11:56:10 +02:00
notification Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
packaging redhat_subscription: call 'remove' instead of 'unsubscribe' (#4809) 2022-06-14 07:26:38 +02:00
remote_management DOC: Documment setting of NTP server in examples. (#4655) 2022-05-30 06:55:22 +02:00
source_control gitlab_hook: use None for non-existent attr in gitlab API response (#4668) 2022-05-17 07:45:10 +02:00
storage Fix quoting bug in zfs. (#4726) 2022-05-28 21:38:30 +02:00
system Sudoers validate (#4794) 2022-06-21 12:41:24 +02:00
web_infrastructure jira: Use fields in comment to merge in additional data (#4304) 2022-03-12 07:30:28 +01:00