Render Ignition JSON from Butane YAML

This commit is contained in:
Khue Doan 2021-06-13 13:08:55 +07:00
parent f1dc32c009
commit ad75900e9c
2 changed files with 18 additions and 1 deletions

View File

@ -53,6 +53,22 @@
dest: "{{ role_path }}/build/http/ignition/{{ hostvars[item]['mac'] }}.yaml"
loop: "{{ groups['metal'] }}"
- name: Render Ignition config from Butane config
docker_container:
name: butane
image: quay.io/coreos/butane:release
auto_remove: yes
volumes:
- "{{ role_path }}/build/http/ignition:/local/src"
working_dir: /local/src
command:
- --pretty
- --strict
- "{{ hostvars[item]['mac'] }}.yaml"
- --output
- "{{ hostvars[item]['mac'] }}.json"
loop: "{{ groups['metal'] }}"
- name: Start ephemeral PXE server
docker_compose:
project_src: "{{ role_path }}/build"
@ -61,4 +77,4 @@
build: yes
recreate: always
notify:
- Stop PXE server
- Stop ephemeral PXE server

View File

@ -1,5 +1,6 @@
variant: fcos
version: 1.3.0
passwd:
users:
- name: core