Initial commit

This commit is contained in:
2026-06-08 21:32:55 +02:00
commit 498018d3d7
11 changed files with 330 additions and 0 deletions
@@ -0,0 +1,12 @@
---
- name: Generate Ignition config for CoreOS/Flatcar
template:
src: ignition.json.j2
dest: "/tmp/{{ vm_name }}_ignition.json"
when: os_type == "coreos" or os_type == "flatcar"
- name: Generate Cloud-init config for MicroOS
template:
src: user-data.yaml.j2
dest: "/tmp/{{ vm_name }}_user-data"
when: os_type == "microos"
@@ -0,0 +1,26 @@
{
"ignition": {
"version": "0.3.0"
},
"passwd": {
"users": [
{
"name": "{{ vm_user }}",
"password_hash": "{{ vm_password | password_hash('sha512') }}",
"ssh_public_keys": [
"{{ lookup('file', vm_ssh_public_key) }}"
]
}
]
},
"storage": {
"files": [
{
"path": "/etc/ssh/sshd_config.d/permit_root_login.conf",
"contents": {
"source": "data:text/plain;charset=utf-8,PermitRootLogin yes"
}
}
]
}
}
@@ -0,0 +1,8 @@
#cloud-config
users:
- name: {{ vm_user }}
passwd: {{ vm_password | password_hash('sha512') }}
ssh_authorized_keys:
- {{ lookup('file', vm_ssh_public_key) }}
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: false