Skip to content

Commit

Permalink
Merge pull request #31 from andreygubarev/user-data-root
Browse files Browse the repository at this point in the history
updated ssh user configuration in user-data template
  • Loading branch information
andreygubarev authored Oct 13, 2023
2 parents fab2ff8 + c5cee29 commit 3bfaacc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions molecule_qemu/playbooks/templates/user-data.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

ssh_pwauth: false
users:
- name: ansible
gecos: Ansible User
- name: root
ssh_authorized_keys:
- {{ ssh_keypair.public_key }}
{% if item.network_ssh_user != 'root' -%}
- name: {{ item.network_ssh_user }}
groups: admin,users,sudo,wheel
shell: /bin/bash
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
lock_passwd: true
ssh_authorized_keys:
- {{ ssh_keypair.public_key }}
{% endif %}

0 comments on commit 3bfaacc

Please sign in to comment.