From db4123fe6103e6b709299d1f33435a43cc6d5745 Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:21:54 -0300 Subject: [PATCH 1/8] defaults/main.yml: added and defined sudoers_include_variables variable --- defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 9149fff..ce2d13f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,3 +5,5 @@ sudoers_sudoers: privileges: "{{ sudoers_sudoers_preset_privileges }}" sudoers_sudoers_d_files: {} + +sudoers_include_variables: true From 31d2ab0e81733f78cd6fecd9ceae2c0b3dc1dfcf Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:23:06 -0300 Subject: [PATCH 2/8] tasks/main.yml: added task conditional sudoers_include_variables --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index cc0638e..ea6273f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,6 +6,7 @@ - "_{{ ansible_distribution_release }}.yml" - "_{{ ansible_distribution | lower }}.yml" - _default.yml + when: sudoers_include_variables | bool tags: - configuration - sudoers From 20ef0c8794ef40187c65f473c10ffe901b445930 Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:23:48 -0300 Subject: [PATCH 3/8] defaults/main.yml: added and defined sudoers_install variable --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index ce2d13f..037816e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,3 +7,4 @@ sudoers_sudoers: sudoers_sudoers_d_files: {} sudoers_include_variables: true +sudoers_install: true From bc6da2d6495d470624b42649c9e2bb321adcd881 Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:24:31 -0300 Subject: [PATCH 4/8] tasks/main.yml: added task conditional sudoers_install --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index ea6273f..174a0e9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,6 +18,7 @@ state: "{{ apt_install_state | default('latest') }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" + when: sudoers_install | bool tags: - configuration - sudoers From 57beb83c87caa4e7c2535e64384f9d6cbebb0d6c Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:25:28 -0300 Subject: [PATCH 5/8] defaults/main.yml: added and defined sudoers_configuration_sudoers_d varialbe --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index 037816e..1dd52f6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,3 +8,4 @@ sudoers_sudoers_d_files: {} sudoers_include_variables: true sudoers_install: true +sudoers_configuration_sudoers_d: true From e1a7f79ddee40dc437fdb3f65aa0322cd78283e1 Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:26:10 -0300 Subject: [PATCH 6/8] tasks/main.yml: added task conditional sudoers_configuration_sudoers_d --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index 174a0e9..af18711 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -47,6 +47,7 @@ group: root mode: 0440 with_dict: "{{ sudoers_sudoers_d_files }}" + when: sudoers_configuration_sudoers_d | bool tags: - configuration - sudoers From 501e9f671503550e18834357dd1f2e0a4df3b41e Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:26:55 -0300 Subject: [PATCH 7/8] defaults/main.yml: added and defined sudoers_configuration_sudoers variable --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index 1dd52f6..89b4a1e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,3 +9,4 @@ sudoers_sudoers_d_files: {} sudoers_include_variables: true sudoers_install: true sudoers_configuration_sudoers_d: true +sudoers_configuration_sudoers: true From cc608fde8c3475467d64f828a6575e9e8796482a Mon Sep 17 00:00:00 2001 From: Damian Sartori Date: Fri, 11 Feb 2022 13:27:51 -0300 Subject: [PATCH 8/8] tasks/main.yml: added tasks conditional sudoers_configuration_sudoers --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index af18711..c47cf64 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,6 +62,7 @@ owner: root group: root mode: 0440 + when: sudoers_configuration_sudoers | bool tags: - configuration - sudoers