You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

77 lines
2.5 KiB

- name: Create the initial ostree repo
hosts: all
vars_files: ../credentials.yaml
tasks:
- name: Solve dependencies for the blueprint
ansible.builtin.command: composer-cli blueprints depsolve kiosk
- name: Start OSTree Compose
ansible.builtin.shell:
cmd: composer-cli compose start-ostree kiosk edge-commit --url http://{{ ansible_default_ipv4.address }}/repo --ref "rhel/9/{{ ansible_architecture }}/edge-kiosk" --parent "rhel/9/{{ ansible_architecture }}/edge" | awk '{print $2}'
register: build_id
- name: Echo BuildID for Microshift Installer
ansible.builtin.debug:
msg: "Build {{ build_id.stdout_lines | first }} is running..."
- name: Echo IPADRESS
ansible.builtin.debug:
msg: "{{ ansible_default_ipv4.address }}"
- name: Wait for compose to finish
infra.osbuild.wait_compose:
compose_id: "{{build_id.stdout_lines | first}}"
timeout: 3600
- name: Create /tmp/commit repo
ansible.builtin.file:
path: /tmp/commit/
mode: '0755'
state: directory
- name: Export the compose artifact to /tmp/commit
infra.osbuild.export_compose: # noqa only-builtins
compose_id: "{{ build_id.stdout_lines | first }}"
dest: /tmp/commit/{{ build_id.stdout_lines | first }}.tar
- name: Create /tmp/commit/ID repo
ansible.builtin.file:
path: /tmp/commit/{{ build_id.stdout_lines | first }}
mode: '0755'
state: directory
- name: Extract compose artifact into /tmp/commit/ID
ansible.builtin.unarchive:
src: /tmp/commit/{{ build_id.stdout_lines | first }}.tar
dest: /tmp/commit/{{ build_id.stdout_lines | first }}
remote_src: true
- name: Pull local ostree repository
become: true
ansible.builtin.shell: ostree --repo=/var/www/repo pull-local "/tmp/commit/{{ build_id.stdout_lines | first }}/repo"
# - name: Clear /tmp/commit repo
# ansible.builtin.file:
# path: /tmp/commit/
# state: absent
- name: config ostree ref
become: true
ansible.builtin.shell: ostree --repo=/var/www/repo refs
register: refs
- name: Print refs
ansible.builtin.debug:
var: refs.stdout_lines
- name: config ostree logs kiosk
become: true
ansible.builtin.shell: ostree --repo=/var/www/repo log rhel/9/{{ ansible_architecture }}/edge-kiosk
register: logs
- name: Print refs
ansible.builtin.debug:
var: logs.stdout_lines