From 34ffaebdcf7ab4bfff5965fe523d94fce9eeb105 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 14 Dec 2022 23:46:00 -0700 Subject: [PATCH] add external repos for koji --- init-refresh-koji-external-repos.yml | 34 ++++++++++++++++++++++++++++ tasks/koji/setup_external_repos.yml | 8 +++++++ vars/koji_repos.yml | 13 +++++++++++ 3 files changed, 55 insertions(+) create mode 100644 init-refresh-koji-external-repos.yml create mode 100644 tasks/koji/setup_external_repos.yml create mode 100644 vars/koji_repos.yml diff --git a/init-refresh-koji-external-repos.yml b/init-refresh-koji-external-repos.yml new file mode 100644 index 0000000..9b59730 --- /dev/null +++ b/init-refresh-koji-external-repos.yml @@ -0,0 +1,34 @@ +--- +- name: Update Koji External Repos + hosts: all + become: true + vars_files: + - "vars/common.yml" + - "vars/koji.yml" + - "vars/koji_repos.yml" + pre_tasks: + - name: Check if ansible cannot be run here + ansible.builtin.stat: + path: /etc/no-ansible + register: no_ansible + + - name: Verify if we can run ansible + ansible.builtin.assert: + that: + - "not no_ansible.stat.exists" + success_msg: "We are able to run on this node" + fail_msg: "/etc/no-ansible exists - skipping run on this node" + + tasks: + - name: Ensure all external repos are in place + import_tasks: "tasks/koji/setup_external_repos.yml" + + post_tasks: + - name: Touching run file that ansible has ran here + ansible.builtin.file: + path: /var/log/ansible.run + state: touch + mode: '0644' + owner: root + group: root +... diff --git a/tasks/koji/setup_external_repos.yml b/tasks/koji/setup_external_repos.yml new file mode 100644 index 0000000..5fdb331 --- /dev/null +++ b/tasks/koji/setup_external_repos.yml @@ -0,0 +1,8 @@ +--- +- name: Creating all external repos + ktdreyer.koji_ansible.koji_tag: + name: "{{ item.key }}" + url: "{{ item.value }}" + state: present + loop: "{{ koji_external_repos | dict2items }}" +... diff --git a/vars/koji_repos.yml b/vars/koji_repos.yml new file mode 100644 index 0000000..a3a118b --- /dev/null +++ b/vars/koji_repos.yml @@ -0,0 +1,13 @@ +--- +koji_external_repos: + deppers-from-aoc: "https://router.angelsofclockwork.net/pub/deps/deppers/$arch/" + dist-rocky8-build-repo: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8-build/latest/$arch/" + distrobuild-internal-srpmproc-repo: "https://distrobuildstg.rockylinux.org/internal-repo/$arch/" + louis-bootstrap-combo: "https://rocky.shootthej.net/src/combo/" + louis-bootstrap-i686: "https://rocky.shootthej.net/src/reqs/" + rocky8-build-3: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8-build/latest/$arch/" + rocky8-build-lh-3: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8-lookahead-build/latest/$arch/" + rocky8-build-prep: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8-prep-build/latest/$arch/" + rocky8_3-updates-build-repo: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8_3-updates-build/latest/$arch/" + rocky8_4-updates-build: "https://kojidev.rockylinux.org/kojifiles/repos/dist-rocky8_4-updates-build/latest/$arch/" +...