Browse Source

Update Kiosk ans kiskstart.yaml

ca-cert-and-multi-ks
ePietry 2 years ago
parent
commit
c5c1f6a487
  1. 37
      ansible/playbooks/kickstart.yaml
  2. 2
      imagebuilder/kiosk.ks

37
ansible/playbooks/kickstart.yaml

@ -1,11 +1,38 @@
- name: creat kickstart - name: Create kickstart
hosts: all hosts: all
become: true
vars_files: ../config.yaml vars_files: ../config.yaml
tasks: tasks:
- name: set MICROSHIFT_PULL_SECRET - name : Remove existing kiosk.ks
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks"
state: absent
- name: Copy fresh kiosk.ks
ansible.builtin.copy:
src: "{{ playbook_dir }}/../../imagebuilder/kiosk.ks"
dest: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks"
mode: '0755'
- name: Set repo adress
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks" path: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks"
regexp: '--url=http://__MYIP__/repo' regexp: '--url=http://__MYIP__/repo'
line: '--url=http://"{{ ansible_default_ipv4.address }}"' line: 'ostreesetup --nogpg --osname=rhel --remote=edge --url=http://{{ ansible_default_ipv4.address }} --ref=rhel/9/x86_64/edge-kiosk'
backrefs: yes backrefs: true
- name: Set MICROSHIFT_PULL_SECRET
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.ks"
regexp: '__MICROSHIFT_PULL_SECRET__'
line: "{{ MICROSHIFT_PULL_SECRET }}"
- name: Install lorax & pykickstart packages
become: true
ansible.builtin.dnf:
state: present
name:
- lorax
- pykickstart

2
imagebuilder/kiosk.ks

@ -42,7 +42,7 @@ reqpart --add-boot
zerombr zerombr
clearpart --all --initlabel clearpart --all --initlabel
reqpart --add-boot reqpart --add-boot
part pv.01 --size=10G --ondisk=/dev/disk/by-path/pci-0000:00:12.0-ata-1 part pv.01 --size=10240 --ondisk=/dev/disk/by-path/pci-0000:00:12.0-ata-1
volgroup system pv.01 volgroup system pv.01
logvol / --fstype="xfs" --size=1 --grow --name=root --vgname=system logvol / --fstype="xfs" --size=1 --grow --name=root --vgname=system
part pv.02 --size=1 --grow --ondisk=/dev/disk/by-path/pci-0000:00:12.0-ata-1 part pv.02 --size=1 --grow --ondisk=/dev/disk/by-path/pci-0000:00:12.0-ata-1

Loading…
Cancel
Save