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

Loading…
Cancel
Save