From d5d093c325a64b4ad610fea05762e5554b899198 Mon Sep 17 00:00:00 2001 From: lavenderguitar Date: Mon, 7 Feb 2022 02:31:28 -0500 Subject: [PATCH] Fix group task and rename default user and group --- defaults/main.yml | 4 ++-- tasks/add_user.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e554421..d022866 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,8 +6,8 @@ preflight__timezone: UTC firewall__ssh_rule: limit # User -user: "admin" -group: "admin" +user: "ops" +group: "ops" # SSH Config ssh__port: 4554 diff --git a/tasks/add_user.yml b/tasks/add_user.yml index 5d7a704..2a1e9e7 100644 --- a/tasks/add_user.yml +++ b/tasks/add_user.yml @@ -4,12 +4,12 @@ name: "{{ group }}" state: present -- name: linode_preflight | add_user | Allow 'admin' group to have passwordless sudo +- name: linode_preflight | add_user | Allow admin group to have passwordless sudo lineinfile: dest: /etc/sudoers state: present - regexp: '^%admin' - line: '%admin ALL=(ALL) NOPASSWD: ALL' + regexp: '^%{{ group }}' + line: '%{{ group }} ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s' become: yes