From 07baf372b4354d2d33cab3ecb5e9314bc7ad37a9 Mon Sep 17 00:00:00 2001 From: obaranov Date: Wed, 6 Jun 2018 12:06:38 +0300 Subject: [PATCH] Skip cdn repo for deployment with custom repo's only For some deployment we need to use just custom repo's provided. For such cases we need to also skip adding cdn extra repos when system is registered with cdn. To do that the --repos-skip-release option is now can be used. RHOSINFRA-1842 Change-Id: I8ebd38dc5db7d17bdf610d60a19e88f8f4afd1ac --- infrared/common/roles/cdn_registery/defaults/main.yml | 4 ++++ infrared/common/roles/cdn_registery/tasks/main.yml | 2 +- plugins/tripleo-undercloud/plugin.spec | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/infrared/common/roles/cdn_registery/defaults/main.yml b/infrared/common/roles/cdn_registery/defaults/main.yml index 216631b1db..902dd5aa31 100644 --- a/infrared/common/roles/cdn_registery/defaults/main.yml +++ b/infrared/common/roles/cdn_registery/defaults/main.yml @@ -3,6 +3,9 @@ subscriptions: - rhel-7-server-rpms - rhel-7-server-extras-rpms - rhel-7-server-rh-common-rpms + 13: + - rhel-ha-for-rhel-7-server-rpms + - rhel-7-server-openstack-beta-rpms 12: - rhel-ha-for-rhel-7-server-rpms - rhel-7-server-openstack-12-rpms @@ -21,3 +24,4 @@ subscriptions: 7: - rhel-7-server-openstack-7.0-rpms - rhel-7-server-openstack-7.0-director-rpms +cdn_skip_openstack_repos: "{{ skip_release|default(false) }}" diff --git a/infrared/common/roles/cdn_registery/tasks/main.yml b/infrared/common/roles/cdn_registery/tasks/main.yml index e8f0fd1acf..b2bbce6dbb 100644 --- a/infrared/common/roles/cdn_registery/tasks/main.yml +++ b/infrared/common/roles/cdn_registery/tasks/main.yml @@ -9,7 +9,7 @@ - name: register to openstack repos vars: - repo_list: "{{ subscriptions.common + subscriptions[install_version|openstack_release] }}" + repo_list: "{{ subscriptions.common + (subscriptions[install_version|openstack_release] if not cdn_skip_openstack_repos else []) }}" modified_list: "{{ repo_list | map('regex_replace', '(.*)', '--enable=\\1') | join(' ') }}" command: "subscription-manager repos {{ modified_list }}" diff --git a/plugins/tripleo-undercloud/plugin.spec b/plugins/tripleo-undercloud/plugin.spec index b42af06baf..e17492cd3e 100644 --- a/plugins/tripleo-undercloud/plugin.spec +++ b/plugins/tripleo-undercloud/plugin.spec @@ -203,7 +203,8 @@ subparsers: type: Bool help: | specifies whether the rhos/rdo-release tools should - be used to install tripleo packages. + be used to install tripleo packages. This flag also disables installation of the extra cdn + repositories. skip-remove-repo: type: Value action: append