-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathignition.yml
More file actions
20 lines (18 loc) · 787 Bytes
/
ignition.yml
File metadata and controls
20 lines (18 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
- name: 'Ignition'
hosts: 'localhost'
connection: 'local'
tasks:
- name: 'Template butane config files' # noqa: risky-file-permissions
ansible.builtin.template:
src: 'templates/coreos/{{ item }}.bu.j2'
dest: 'files/coreos/{{ item }}.bu'
loop: '{{ groups["containers_hosts"] }}'
- name: 'Generate ignition files from butane configs' # noqa: no-changed-when
ansible.builtin.command:
cmd: 'butane --pretty --strict files/coreos/{{ item }}.bu --output files/coreos/{{ item }}.ign'
loop: '{{ groups["containers_hosts"] }}'
- name: 'Serve the file on http://{{ ansible_fqdn }}:8000' # noqa: name[template] no-changed-when
ansible.builtin.command:
cmd: 'python3 -m http.server'
chdir: 'files/coreos'