From 9015cfbbe42ef8c7e3742b2494fcbf32083d2453 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Mon, 17 Dec 2018 00:51:41 +0000 Subject: [PATCH] Make sure user is in sudo group --- ansible/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ansible/main.yml b/ansible/main.yml index 03ea6b6..b2ca6aa 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -315,6 +315,21 @@ dest: /etc/chkrootkit.conf mode: 0644 + # ------------------------------------------------------------------------- + # Install sudo and user to group. + # ------------------------------------------------------------------------- + + - name: Install sudo + apt: + name: sudo + + - name: Adding existing user to group sudo + user: + name: "{{ ansible_ssh_user }}" + groups: sudo + append: yes + + # ------------------------------------------------------------------------- # Docker CE. # -------------------------------------------------------------------------