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.
 
 
 
 
 

44 lines
1.6 KiB

- name: Create the initial ostree repo
hosts: all
become: true
tasks:
- name: Create blueprint repo
ansible.builtin.file:
path: /tmp/blueprints
mode: '0755'
state: directory
- name: Copy blueprint file
ansible.builtin.copy:
src: "{{ playbook_dir }}/../blueprints/{{ blueprint }}"
dest: /tmp/blueprints/blueprint.toml
mode: '0755'
- name: Push a blueprint
infra.osbuild.push_blueprint:
src: "/tmp/blueprints/blueprint.toml"
- name: Start ostree compose with idempotent transaction
infra.osbuild.start_compose:
blueprint: rhel-edge-blueprint
allow_duplicate: true
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 repo
ansible.builtin.file:
path: /tmp/images/
mode: '0755'
state: directory
- name: Export the compose artifact
infra.osbuild.export_compose: # noqa only-builtins
compose_id: "{{ builder_compose_start_out['result']['body']['build_id'] }}"
dest: /tmp/images/{{ builder_compose_start_out['result']['body']['build_id'] }}.tar
- name: Recursively remove directory /var/www/repo
ansible.builtin.file:
path: /var/www/repo
state: absent
- name: Extract compose artifact into /var/www/repo
ansible.builtin.unarchive:
src: /tmp/images/{{ builder_compose_start_out['result']['body']['build_id'] }}.tar
dest: /var/www/
remote_src: true