Skip to content

Commit

Permalink
Merge pull request #38 from EconomicTouristsArmLate/fix-default-groups
Browse files Browse the repository at this point in the history
Create correct sudoer group per distro
  • Loading branch information
andreygubarev authored May 10, 2024
2 parents 0a06e00 + 94b8b59 commit 1366dfe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion molecule_qemu/playbooks/templates/user-data.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ users:
- {{ ssh_keypair.public_key }}
{% if item.network_ssh_user != 'root' -%}
- name: {{ item.network_ssh_user }}
groups: admin,users,sudo,wheel
groups:
- admin
- users
{% if ansible_os_family == 'Debian' -%}
- sudo
{% elif ansible_os_family == 'RedHat' -%}
- wheel
{%- endif +%}
shell: /bin/bash
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
lock_passwd: true
Expand Down

0 comments on commit 1366dfe

Please sign in to comment.