diff --git a/ansible/blueprints/blueprint.toml b/ansible/blueprints/blueprint.toml new file mode 100755 index 0000000..9b6bd48 --- /dev/null +++ b/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" diff --git a/ansible/playbooks/blueprint.vars b/ansible/playbooks/blueprint.vars deleted file mode 100644 index 72ab8fb..0000000 --- a/ansible/playbooks/blueprint.vars +++ /dev/null @@ -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" \ No newline at end of file diff --git a/ansible/playbooks/initial_ostree.yaml b/ansible/playbooks/initial_ostree.yaml old mode 100644 new mode 100755 index 3fb4f91..d56b377 --- a/ansible/playbooks/initial_ostree.yaml +++ b/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