From d62c8337344b4047c1ea5a643b47a5c19cfda0bf Mon Sep 17 00:00:00 2001 From: alecsandru Date: Fri, 3 May 2024 12:29:12 +0000 Subject: [PATCH] Update 'create_deployment_user.yml' --- create_deployment_user.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/create_deployment_user.yml b/create_deployment_user.yml index be5a7ce..353090e 100644 --- a/create_deployment_user.yml +++ b/create_deployment_user.yml @@ -16,3 +16,10 @@ generate_ssh_key: yes # Generate an SSH key pair for the user ssh_key_bits: 2048 ssh_key_file: .ssh/id_rsa + - name: Add sudoers entry + lineinfile: + dest: /etc/sudoers.d/ansible + state: present + regexp: '^ansible' + line: 'ansible ALL=(ALL) NOPASSWD: ALL' + validate: 'visudo -cf %s'