Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SequeI committed Nov 24, 2024
1 parent 3a9beb3 commit dbad4da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars:
users:
- user: testingUser
password: $y$j9T$WNDCnTZIfLYSpTiZ1yFdJ1$fvdsvfLEdpi39mS/SbfsgPQdAQ//D8xySIXF5hLFdU2
password: testingPassword0x
vars_files:
- vars/vars.yml

Expand Down
8 changes: 4 additions & 4 deletions molecule/testing_user_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion molecule/user_provided/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars:
users:
- user: testingUser
password: $y$j9T$WNDCnTZIfLYSpTiZ1yFdJ1$fvdsvfLEdpi39mS/SbfsgPQdAQ//D8xySIXF5hLFdU2
password: testingUser0x
vars_files:
- vars/vars.yml
tasks:
Expand Down

0 comments on commit dbad4da

Please sign in to comment.