From bbb00018568b79c7396f2d54d198a23f1b9d69b3 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 12 Sep 2017 19:09:03 +0100 Subject: [PATCH] SUSE: Add OpenStack cloud repository when bootstrapping the host This is similar to I21ab8e13f25bb7a769dcf504fa6915303bc2feec. Even though most of the bootstrap packages are provided by the distribution mirrors, it's best if we add the OpenStack repository just in case there are any OpenStack specific package updates. Change-Id: I5db15736d46f98b0b20b1e227afa7f713df7064d --- deploy-guide/source/deploymenthost.rst | 1 + doc/source/contributor/quickstart-aio.rst | 1 + .../bootstrap-host/tasks/install_packages.yml | 14 ++++++++++++++ tests/roles/bootstrap-host/vars/suse.yml | 4 ++++ 4 files changed, 20 insertions(+) diff --git a/deploy-guide/source/deploymenthost.rst b/deploy-guide/source/deploymenthost.rst index 1bb28bb8af..4bcfcac9ac 100644 --- a/deploy-guide/source/deploymenthost.rst +++ b/deploy-guide/source/deploymenthost.rst @@ -122,6 +122,7 @@ Before you begin, we recommend upgrading your system packages and kernel. .. code-block:: shell-session + # zypper ar http://download.opensuse.org/repositories/Cloud:/OpenStack:/Pike/openSUSE_Leap_42.3 OBS:Cloud:OpenStack:Pike # zypper install git-core ntp openssh python-devel \ sudo gcc libffi-devel libopenssl-devel diff --git a/doc/source/contributor/quickstart-aio.rst b/doc/source/contributor/quickstart-aio.rst index 18fe7549e2..0430f6b2b0 100644 --- a/doc/source/contributor/quickstart-aio.rst +++ b/doc/source/contributor/quickstart-aio.rst @@ -69,6 +69,7 @@ system packages are upgraded and then reboot into the new kernel: ## openSUSE # zypper up + # zypper ar http://download.opensuse.org/repositories/Cloud:/OpenStack:/Pike/openSUSE_Leap_42.3 OBS:Cloud:OpenStack:Pike # zypper in git-core # reboot diff --git a/tests/roles/bootstrap-host/tasks/install_packages.yml b/tests/roles/bootstrap-host/tasks/install_packages.yml index 22cf5cdf16..b8d90dbe2e 100644 --- a/tests/roles/bootstrap-host/tasks/install_packages.yml +++ b/tests/roles/bootstrap-host/tasks/install_packages.yml @@ -90,6 +90,20 @@ when: - ansible_pkg_mgr in ['yum', 'dnf'] +# openSUSE +- name: Add zypper cloud repositories + zypper_repository: + auto_import_keys: yes + autorefresh: yes + name: "{{ item.name }}" + repo: "{{ item.uri }}" + runrefresh: yes + with_items: "{{ opensuse_openstack_repos }}" + retries: 5 + delay: 2 + when: + - ansible_pkg_mgr == 'zypper' + - name: Remove known problem packages package: name: "{{ packages_remove }}" diff --git a/tests/roles/bootstrap-host/vars/suse.yml b/tests/roles/bootstrap-host/vars/suse.yml index 1e3609e0d5..0bb027b146 100644 --- a/tests/roles/bootstrap-host/vars/suse.yml +++ b/tests/roles/bootstrap-host/vars/suse.yml @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +opensuse_openstack_repos: + - name: "OBS:Cloud:OpenStack:Pike" + uri: "http://download.opensuse.org/repositories/Cloud:/OpenStack:/Pike/openSUSE_Leap_{{ ansible_distribution_version }}" + packages_install: - bridge-utils - curl