From 7e29f9ef0a457b23b019e211f6755d5caf89f0ac Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 23 Feb 2026 12:47:17 +0100 Subject: [PATCH] build --- roles/init/tasks/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/init/tasks/main.yml b/roles/init/tasks/main.yml index 025065a..3c697aa 100755 --- a/roles/init/tasks/main.yml +++ b/roles/init/tasks/main.yml @@ -24,10 +24,10 @@ append: true when: group_check is succeeded - - name: Give deploy sudo access - ansible.builtin.copy: + - name: Give jd passwordless sudo + copy: dest: /etc/sudoers.d/jd - content: "jd ALL=(ALL:ALL) ALL\n" + content: "jd ALL=(ALL) NOPASSWD:ALL\n" owner: root group: root mode: '0440' @@ -36,6 +36,7 @@ ansible.builtin.user: name: root password: "{{ jd_password | password_hash('sha512') }}" + - name: Update become password for subsequent tasks ansible.builtin.set_fact: ansible_become_password: "{{ jd_password }}"