Updated the user group settings to only include 'sudo' group, removing unnecessary groups. This change improves code readability and maintainability.
25 lines
468 B
Django/Jinja
25 lines
468 B
Django/Jinja
#cloud-config
|
|
|
|
users:
|
|
- name: {{ ci_user }}
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
groups: sudo
|
|
shell: /bin/bash
|
|
lock_passwd: false
|
|
passwd: {{ ci_password | password_hash('sha512') }}
|
|
ssh_authorized_keys:
|
|
- {{ lookup('file', ssh_key_path) }}
|
|
|
|
chpasswd:
|
|
expire: false
|
|
|
|
ssh_pwauth: true
|
|
|
|
timezone: "{{ timezone | default('UTC') }}"
|
|
|
|
package_update: true
|
|
package_upgrade: false
|
|
|
|
runcmd:
|
|
- echo "Cloud-init user-data executed for {{ hostname }}"
|