From 7f1d80741c571dd1e5ea9b3867943a120f20f732 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 23 Mar 2024 12:00:04 -0500 Subject: [PATCH] create-user: ensure sudo is present --- roles/create-user/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/create-user/tasks/main.yml b/roles/create-user/tasks/main.yml index 2d36790..0498d93 100644 --- a/roles/create-user/tasks/main.yml +++ b/roles/create-user/tasks/main.yml @@ -16,6 +16,12 @@ register: user_created notify: print generated password +- name: Ensure 'sudo' package is installed + become: true + ansible.builtin.package: + name: sudo + state: present + - name: enable nopasswd sudo become: true lineinfile: