summaryrefslogtreecommitdiffstats
path: root/roles/sudo/tasks
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-09-10 17:52:58 +0200
committerAhmed Abdelhalim <[email protected]>2025-09-10 17:52:58 +0200
commite9e609e89ad879e10e58f2c4fcfa572f60d6dfad (patch)
tree6353c98fa1b6ad69c21931ac299e8522f48c645f /roles/sudo/tasks
parenta5983fd890fc94650e9cc0b890220931ad3b3a88 (diff)
Refactor role dependencies to be more module modular
This modularity means that each role can be installed in a playbook by itself as long as the other roles exist around it. This also straps the ensure dependency packages exist in any of the roles tasks, they should be moved to their own roles and configured properly if needed.
Diffstat (limited to 'roles/sudo/tasks')
-rw-r--r--roles/sudo/tasks/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/sudo/tasks/main.yml b/roles/sudo/tasks/main.yml
new file mode 100644
index 00000000..a64f78d3
--- /dev/null
+++ b/roles/sudo/tasks/main.yml
@@ -0,0 +1,17 @@
+---
+- name: "Ensure sudo is installed"
+ become: true
+ ansible.builtin.package:
+ name:
+ - "sudo"
+ state: "present"
+
+- name: "Configure permissions for group: sudo"
+ become: true
+ community.general.sudoers:
+ name: "sudo"
+ group: "sudo"
+ commands: "ALL"
+ nopassword: false
+ sudoers_path: "/etc/sudoers.d"
+ state: present