MicroOS plus ext partition and user creation

This commit is contained in:
2026-06-21 13:31:35 +02:00
parent 3a4938b9e6
commit 874438cdf6
7 changed files with 142 additions and 30 deletions
+19 -9
View File
@@ -1,18 +1,28 @@
---
- name: Generate Ignition configuration for CoreOS/Flatcar
- name: Generate Butane config for CoreOS
template:
src: ignition.json.j2
dest: "{{ vm_images_dir }}/{{ vm_name }}.ign"
when: os_type == 'coreos' or os_type == 'flatcar'
src: coreos_ignition.bu.j2
dest: "/tmp/{{ vm_name }}.bu"
when: os_type == 'coreos'
- name: Generate Cloud-init configuration for MicroOS
- name: Generate Butane config for Flatcar
template:
src: user-data.yaml.j2
dest: "{{ vm_images_dir }}/{{ vm_name }}_user-data"
src: flatcar_ignition.bu.j2
dest: "/tmp/{{ vm_name }}.bu"
when: os_type == 'flatcar'
- name: Generate Butane config for microos
template:
src: microos_ignition.bu.j2
dest: "/tmp/{{ vm_name }}.bu"
when: os_type == 'microos'
- name: Compile Butane to Ignition JSON
shell: |
docker run --rm -i quay.io/coreos/butane --pretty --strict < /tmp/{{ vm_name }}.bu > {{ vm_images_dir }}/{{ vm_name }}.ign
become: yes
- name: Generate dummy meta-data file
copy:
content: "instance-id: {{ vm_name }}\nlocal-hostname: {{ vm_name }}\n"
dest: "{{ vm_images_dir }}/{{ vm_name }}_meta-data"
dest: "{{ vm_images_dir }}/{{ vm_name }}_meta-data"