Browse Source

Improvement to blueprint repertory

ca-cert-and-multi-ks
ePietry 2 years ago
parent
commit
930522da96
  1. 6
      ansible/blueprints/blueprint.toml
  2. 5
      ansible/playbooks/blueprint.vars
  3. 26
      ansible/playbooks/initial_ostree.yaml

6
ansible/blueprints/blueprint.toml

@ -0,0 +1,6 @@
name = "minimal-rhel9"
description = "minimal blueprint for ostree commit"
version = "1.1.0"
modules = []
groups = []
distro = "rhel-93"

5
ansible/playbooks/blueprint.vars

@ -1,5 +0,0 @@
builder_blueprint_name: "minimal-rhel9"
builder_blueprint_description: "minimal blueprint for ostree commit"
builder_blueprint_distro: rhel-93
builder_blueprint_customizations:
version: "1.1.0"

26
ansible/playbooks/initial_ostree.yaml

@ -1,18 +1,21 @@
- name: Create the initial ostree repo
hosts: all
become: true
vars_files:
- blueprint.vars
tasks:
- name: Add user to weldr group
ansible.builtin.user:
name: "{{ ansible_user_id }}"
groups: weldr
append: true
- 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.toml"
dest: /tmp/blueprints/blueprint.toml
mode: '0755'
- name: Push a blueprint
infra.osbuild.push_blueprint:
src: "/home/epietryk/blueprint/blueprint.toml"
- name: Start ostree compose
src: "/tmp/blueprints/blueprint.toml"
- name: Start ostree compose with idempotent transaction
infra.osbuild.start_compose:
blueprint: rhel-edge-blueprint
allow_duplicate: true
@ -37,11 +40,6 @@
ansible.builtin.file:
path: /var/www/repo
state: absent
# - name: Create empty file /var/www/repo
# ansible.builtin.file:
# path: /var/www/repo
# state: directory
# mode: '0755'
- name: Extract compose artifact into /var/www/repo
ansible.builtin.unarchive:
src: /tmp/images/{{ builder_compose_start_out['result']['body']['build_id'] }}.tar

Loading…
Cancel
Save