From dbad4da3ff726f8e0f724049edc509613d554bb4 Mon Sep 17 00:00:00 2001 From: SequeI Date: Tue, 19 Nov 2024 10:12:16 +0000 Subject: [PATCH] review fix --- molecule/default/prepare.yml | 2 +- molecule/testing_user_setup.yaml | 8 ++++---- molecule/user_provided/prepare.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index 0d282780..1cb554fc 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -5,7 +5,7 @@ vars: users: - user: testingUser - password: $y$j9T$WNDCnTZIfLYSpTiZ1yFdJ1$fvdsvfLEdpi39mS/SbfsgPQdAQ//D8xySIXF5hLFdU2 + password: testingPassword0x vars_files: - vars/vars.yml diff --git a/molecule/testing_user_setup.yaml b/molecule/testing_user_setup.yaml index 6c5519d1..19e1f123 100644 --- a/molecule/testing_user_setup.yaml +++ b/molecule/testing_user_setup.yaml @@ -2,12 +2,12 @@ - name: Create a non-root sudoer user ansible.builtin.user: name: "{{ item.user }}" - password: "{{ item.password }}" shell: /bin/bash + group: wheel create_home: yes -- name: Add user to wheel group - shell: usermod -aG wheel {{ item.user }} +- name: Set password for testingUser + ansible.builtin.shell: echo {{ item.password }} | passwd --stdin {{ item.user }} - name: Configure Sudoers for the user ansible.builtin.lineinfile: @@ -44,7 +44,7 @@ ansible.builtin.lineinfile: path: "{{ molecule_ephemeral_directory }}/inventory/molecule_inventory.yml" regexp: 'ansible_user:' - line: "ansible_user: {{ item.user }}, ansible_become: true, ansible_become_password: {{ item.password }}}" + line: "ansible_user: {{ item.user }}, ansible_become_password: {{ item.password }}, ansible_become: true}" delegate_to: localhost - name: Force refresh inventory diff --git a/molecule/user_provided/prepare.yml b/molecule/user_provided/prepare.yml index 6571833c..60fe5a95 100644 --- a/molecule/user_provided/prepare.yml +++ b/molecule/user_provided/prepare.yml @@ -5,7 +5,7 @@ vars: users: - user: testingUser - password: $y$j9T$WNDCnTZIfLYSpTiZ1yFdJ1$fvdsvfLEdpi39mS/SbfsgPQdAQ//D8xySIXF5hLFdU2 + password: testingUser0x vars_files: - vars/vars.yml tasks: