committed by
GitHub
10 changed files with 140 additions and 24 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 |
||||
@ -0,0 +1 @@ |
|||||
|
custom-ca.key |
||||
@ -0,0 +1,19 @@ |
|||||
|
-----BEGIN CERTIFICATE----- |
||||
|
MIIDCTCCA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nwopfcKf1moSFUFRgHM0Z9qfbOUnDTnSswxfDJpz7HBoAhpaODtSZr3 |
||||
|
pZBt84iZo4/iqwsphA== |
||||
|
-----END CERTIFICATE----- |
||||
@ -0,0 +1,57 @@ |
|||||
|
Name: ca-certificates-custom |
||||
|
Version: 0.0.1 |
||||
|
Release: rh1 |
||||
|
Summary: Custom CA Certificates |
||||
|
License: BSD |
||||
|
Source0: custom-ca.crt |
||||
|
Requires(post): ca-certificates |
||||
|
Requires(postun): ca-certificates |
||||
|
BuildArch: noarch |
||||
|
|
||||
|
%description |
||||
|
Custom CA certificates |
||||
|
|
||||
|
# We are evil, we have no changelog ! |
||||
|
%global source_date_epoch_from_changelog 0 |
||||
|
|
||||
|
%prep |
||||
|
## |
||||
|
## If you do not have a real CA certificate, you can generate one with: |
||||
|
## |
||||
|
# openssl req -new -nodes -keyout custom-ca.key -out custom-ca.crt -x509 -subj '/CN=Custom CA' |
||||
|
cp %{S:0} custom-ca.crt |
||||
|
|
||||
|
%build |
||||
|
|
||||
|
%install |
||||
|
install -m 0644 -D custom-ca.crt %{buildroot}/etc/pki/ca-trust/source/anchors/custom-ca.crt |
||||
|
|
||||
|
%files |
||||
|
%config %attr(0644, root, root) /etc/pki/ca-trust/source/anchors/custom-ca.crt |
||||
|
|
||||
|
%post |
||||
|
## |
||||
|
## You can verify the post script is working by running the following command |
||||
|
## after the RPM installation: |
||||
|
## |
||||
|
# |
||||
|
# user@localhost$ grep -i custom /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem |
||||
|
# Custom CA |
||||
|
# user@localhost$ echo $? |
||||
|
# 0 |
||||
|
# |
||||
|
update-ca-trust extract |
||||
|
|
||||
|
%postun |
||||
|
## |
||||
|
## You can verify the postun script is working by running the following command |
||||
|
## after the RPM un-installation: |
||||
|
## |
||||
|
# |
||||
|
# user@localhost$ grep -i custom /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem |
||||
|
# user@localhost$ echo $? |
||||
|
# 1 |
||||
|
# |
||||
|
update-ca-trust extract |
||||
|
|
||||
|
%changelog |
||||
Loading…
Reference in new issue