From: David Galloway Date: Thu, 2 Apr 2020 18:16:55 +0000 (-0400) Subject: testnode: Add support for additional yum repos defined in secrets X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F559%2Fhead;p=ceph-cm-ansible.git testnode: Add support for additional yum repos defined in secrets Signed-off-by: David Galloway --- diff --git a/roles/testnode/README.rst b/roles/testnode/README.rst index ebccc5f1..69e187dd 100644 --- a/roles/testnode/README.rst +++ b/roles/testnode/README.rst @@ -85,6 +85,19 @@ will be used as the properties for the repo file:: gpgcheck: 0 priority: 0 +Another dictionary of yum repos to put in place. We have this dictionary defined in the Octo lab secrets repo. We have devel +repos with baseurls we don't want to expose the URLs of. This dict gets combined with ``yum_repos`` in ``roles/testnode/tasks/yum/repos.yml``:: + + additional_yum_repos: {} + + # An example: + additional_yum_repos: + devel-ceph-repo: + name: This is a repo with devel packages + baseurl: http://some/private/repo/ + enabled: 0 + gpgcheck: 0 + A list of copr repos to enable using ``dnf copr enable``:: copr_repos: [] diff --git a/roles/testnode/tasks/yum/repos.yml b/roles/testnode/tasks/yum/repos.yml index 96a978af..278d8d7f 100644 --- a/roles/testnode/tasks/yum/repos.yml +++ b/roles/testnode/tasks/yum/repos.yml @@ -28,8 +28,8 @@ group: root mode: 0644 register: version_repo_file - with_dict: "{{ yum_repos }}" - when: yum_repos.keys() | length > 0 + with_dict: "{{ yum_repos|default({}) | combine(additional_yum_repos|default({}), recursive=True) }}" + when: (yum_repos.keys() | length > 0) or (additional_yum_repos.keys() | length > 0) - name: Enable copr repos command: "dnf -y copr enable {{ item }}"