From a5f9d164a71be8c053b2a2893f9df0dacd83f647 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 4 Sep 2022 17:15:52 +0200 Subject: [PATCH] wheel for sudo too --- roles/wheel/tasks/main.yml | 4 ++++ roles/wheel/tasks/sudo.yml | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 roles/wheel/tasks/sudo.yml diff --git a/roles/wheel/tasks/main.yml b/roles/wheel/tasks/main.yml index e7af76a..6948dfc 100644 --- a/roles/wheel/tasks/main.yml +++ b/roles/wheel/tasks/main.yml @@ -6,3 +6,7 @@ - name: 'alpine-specific wheel things' include_tasks: alpine.yml when: ansible_distribution == "Alpine" + +- name: setup with sudo + include_tasks: sudo.yml + when: ansible_distribution in ["Debian", "Ubuntu"] diff --git a/roles/wheel/tasks/sudo.yml b/roles/wheel/tasks/sudo.yml new file mode 100644 index 0000000..efe4792 --- /dev/null +++ b/roles/wheel/tasks/sudo.yml @@ -0,0 +1,11 @@ +- name: install sudo + apt: + name: sudo + when: ansible_distribution in ["Debian", "Ubuntu"] + +- name: allow wheel sudo without password + community.general.sudoers: + commands: ALL + group: wheel + name: wheel + nopassword: true