]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Add support for additional yum repos defined in secrets 559/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 2 Apr 2020 18:16:55 +0000 (14:16 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 2 Apr 2020 18:16:55 +0000 (14:16 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/README.rst
roles/testnode/tasks/yum/repos.yml

index ebccc5f18328263aa70bc4552f90b3d195235f11..69e187dd0166055445fcc4a361b8d14aeda71ae5 100644 (file)
@@ -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: []
index 96a978af4a9169c6e06bac4b39a670469dd70044..278d8d7f6ed0261d899bf7a61adc74d3b42429b8 100644 (file)
@@ -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 }}"