Files
Ansible-Bootstrap/roles/virtualization/templates/cloud-user-data.yml.j2
Sandwich 2a82ee4d5c fix: resolve Jinja2 .keys ambiguity, fastfetch availability, and python interpreter
- Use bracket notation item['keys'] instead of item.keys to avoid
  conflict with Python dict .keys() method
- Remove fastfetch from Debian 12 package list (only available in 13+)
- Set explicit python interpreter path for post-reboot tasks
2026-02-20 16:58:58 +01:00

22 lines
556 B
Django/Jinja

#cloud-config
hostname: "archiso"
ssh_pwauth: true
package_update: false
package_upgrade: false
users:
{% for user in system_cfg.users %}
- name: "{{ user.name }}"
primary_group: "{{ user.name }}"
groups: users
sudo: "{{ user.sudo | default('ALL=(ALL) NOPASSWD:ALL') }}"
passwd: "{{ user.password | password_hash('sha512') }}"
lock_passwd: false
{% set ssh_keys = user['keys'] | default([]) %}
{% if ssh_keys | length > 0 %}
ssh_authorized_keys:
{% for key in ssh_keys %}
- "{{ key }}"
{% endfor %}
{% endif %}
{% endfor %}