5 changed files with 48 additions and 23 deletions
@ -0,0 +1,30 @@ |
|||||
|
- debug: |
||||
|
msg: "Injecting Kickstart of {{ device.hostname }} into ISO..." |
||||
|
|
||||
|
- name: Create kiosk.ks from template |
||||
|
ansible.builtin.template: |
||||
|
src: "kiosk.ks.j2" |
||||
|
dest: "{{ tmp.path }}/kiosk-{{ device.hostname }}.ks" |
||||
|
|
||||
|
- name: Validate kiosk.ks using ksvalidator |
||||
|
ansible.builtin.command: |
||||
|
cmd: "ksvalidator {{ tmp.path }}/kiosk-{{ device.hostname }}.ks" |
||||
|
|
||||
|
- name: Create new kiosk.iso file |
||||
|
ansible.builtin.command: |
||||
|
cmd: "mkksiso -r 'inst.ks' --ks {{ tmp.path }}/kiosk-{{ device.hostname }}.ks {{ tmp.path }}/{{ compose_id }}.iso {{ tmp.path }}/kiosk.iso" |
||||
|
|
||||
|
- name: Copy new ISO to /var/www |
||||
|
copy: |
||||
|
src: "{{ tmp.path }}/kiosk.iso" |
||||
|
dest: "{{ www_location }}/kiosk-{{ device.hostname }}.iso" |
||||
|
remote_src: true |
||||
|
become: true |
||||
|
|
||||
|
- name: Cleanup |
||||
|
ansible.builtin.file: |
||||
|
path: '{{ item }}' |
||||
|
state: absent |
||||
|
loop: |
||||
|
- "{{ tmp.path }}/kiosk.iso" |
||||
|
- "{{ tmp.path }}/kiosk-{{ device.hostname }}.ks" |
||||
@ -0,0 +1,10 @@ |
|||||
|
kickstart_devices: |
||||
|
- hostname: kiosk.localdomain |
||||
|
storage: |
||||
|
root_disk: /dev/disk/by-path/pci-0000:00:12.0-ata-1 |
||||
|
network: |
||||
|
interface: enp1s0 |
||||
|
ip_address: 192.168.122.23 |
||||
|
netmask: 255.255.255.0 |
||||
|
gateway: 192.168.122.1 |
||||
|
dns: 192.168.122.1 |
||||
Loading…
Reference in new issue