Skip to content

Commit

Permalink
updated ssh user configuration in user-data template
Browse files Browse the repository at this point in the history
  • Loading branch information
andreygubarev committed Oct 13, 2023
1 parent fab2ff8 commit c5cee29
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 c5cee29

Please sign in to comment.