2 changed files with 67 additions and 0 deletions
@ -0,0 +1,66 @@ |
|||||
|
- 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 |
||||
|
infra.osbuild.start_compose: |
||||
|
blueprint: kiosk |
||||
|
compose_type: edge-commit |
||||
|
allow_duplicate: true |
||||
|
ostree_url: http://{{ ansible_default_ipv4.address }}/repo |
||||
|
register: builder_compose_start_out |
||||
|
|
||||
|
- name: Wait for compose to finish |
||||
|
infra.osbuild.wait_compose: |
||||
|
compose_id: "{{ builder_compose_start_out['result']['body']['build_id'] }}" |
||||
|
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: "{{ builder_compose_start_out['result']['body']['build_id'] }}" |
||||
|
dest: /tmp/commit/{{ builder_compose_start_out['result']['body']['build_id'] }}.tar |
||||
|
|
||||
|
- name: Create /tmp/commit/ID repo |
||||
|
ansible.builtin.file: |
||||
|
path: /tmp/commit/{{ builder_compose_start_out['result']['body']['build_id'] }} |
||||
|
mode: '0755' |
||||
|
state: directory |
||||
|
|
||||
|
|
||||
|
- name: Extract compose artifact into /var/www/repo |
||||
|
ansible.builtin.unarchive: |
||||
|
src: /tmp/commit/{{ builder_compose_start_out['result']['body']['build_id'] }}.tar |
||||
|
dest: /tmp/commit/{{ builder_compose_start_out['result']['body']['build_id'] }} |
||||
|
remote_src: true |
||||
|
|
||||
|
- name: Pull local ostree repository |
||||
|
become: true |
||||
|
ansible.builtin.shell: ostree --repo=/var/www/repo pull-local "/tmp/commit/{{ builder_compose_start_out['result']['body']['build_id'] }}/repo" |
||||
|
|
||||
|
- 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/x86_64/edge |
||||
|
register: logs |
||||
|
|
||||
|
- name: Print refs |
||||
|
ansible.builtin.debug: |
||||
|
var: logs.stdout_lines |
||||
Loading…
Reference in new issue