Browse Source

Update kickstart playbook

ca-cert-and-multi-ks
ePietry 2 years ago
parent
commit
190d0e55ae
  1. 6
      ansible/README.MD
  2. 2
      ansible/playbooks/gen_iso_image.yaml
  3. 29
      ansible/playbooks/kickstart.yaml

6
ansible/README.MD

@ -157,5 +157,9 @@ Generate the ISO image of the installer by using the following playbook :
ansible-playbook playbooks/gen_iso_image.yaml ansible-playbook playbooks/gen_iso_image.yaml
``` ```
## Prepare the Kickstart script ## Prepare & inject the Kickstart script
Prepare & inject the Kisckstart script and create the final kiosk.ios, use the followin playbook :
```
ansible-playbook playbooks/kickstart.yaml
```

2
ansible/playbooks/gen_iso_image.yaml

@ -43,4 +43,4 @@
- name: Export the compose artifact to /tmp/commit - name: Export the compose artifact to /tmp/commit
infra.osbuild.export_compose: # noqa only-builtins infra.osbuild.export_compose: # noqa only-builtins
compose_id: "{{ build_id.stdout_lines | first }}" compose_id: "{{ build_id.stdout_lines | first }}"
dest: /{{ ansible_env.HOME }}/{{ build_id.stdout_lines | first }} #Ou mettre cette image ? dest: /{{ ansible_env.HOME }}/installer.iso

29
ansible/playbooks/kickstart.yaml

@ -34,5 +34,30 @@
- lorax - lorax
- pykickstart - pykickstart
- name: Validate kiosk.ks using ksvalidator
ansible.builtin.command:
cmd: "ksvalidator {{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks"
register: ksvalidator_output
ignore_errors: yes
- name: Output error message if ksvalidator fails
ansible.builtin.debug:
msg: "{{ksvalidator_output.stderr_lines}}"
when: ksvalidator_output is failed
- name : Remove existing kiosk.ios
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/kiosk.iso"
state: absent
- name: Create new kiosk.ios file
ansible.builtin.command:
cmd: "mkksiso -r 'inst.ks' --ks kiosk.ks 'installer.iso' kiosk.iso"
register: ksvalidator_output
- name : Remove installer.iso
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/installer.iso"
state: absent

Loading…
Cancel
Save