Skip to content

Commit

Permalink
feat: Add variable that handles semantic check for sudoers
Browse files Browse the repository at this point in the history
This variable provides semantic check of already configured
sudoers in case ansible setup is not needed and it is skipped.

Signed-off-by: Radovan Sroka <[email protected]>
  • Loading branch information
radosroka committed Sep 17, 2024
1 parent 4ab46ad commit ff28f28
Show file tree
Hide file tree
Showing 14 changed files with 1,303 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Default: `true`

Type: `bool`

### sudo_check_if_configured

This variable provides semantic check of already configured sudoers in case ansible setup is not needed and it is skipped.

Default: `true`

Type: `bool`

### sudo_remove_unauthorized_included_files

***Dangerous!*** Setting this to `true` removes each existing sudoers file in the `include_directories` dictionary that are not defined in the`sudo_sudoers_files` variable.
Expand Down
6 changes: 6 additions & 0 deletions ansible_pytest_extra_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: MIT

# ansible and dependencies for all supported platforms
ansible ; python_version > "2.6"
idna<2.8 ; python_version < "2.7"
PyYAML<5.1 ; python_version < "2.7"
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
sudo_rewrite_default_sudoers_file: true
sudo_remove_unauthorized_included_files: false

sudo_check_if_configured: true

sudo_visudo_path: /usr/sbin/visudo

sudo_transactional_update_reboot_ok: null
Expand Down
Loading

0 comments on commit ff28f28

Please sign in to comment.