From 1a378b5ddb8f97574b56f2dbf6116a92e49f0f4d Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 15 Feb 2017 14:54:56 +0000 Subject: [PATCH] vars: suse.yml: Add SUSE support Add new variables file for SUSE based distributions. SUSE doesn't provide a keyring package and all requires packages are available in the default repositories so we skip the relevant tasks. Change-Id: Ied2960ba3870da8dd88c6f616357ace359b83694 --- .../notes/suse-support-7919a5e43ebdd793.yaml | 5 ++++ tasks/pre_install.yml | 5 +++- vars/suse.yml | 26 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/suse-support-7919a5e43ebdd793.yaml create mode 100644 vars/suse.yml diff --git a/releasenotes/notes/suse-support-7919a5e43ebdd793.yaml b/releasenotes/notes/suse-support-7919a5e43ebdd793.yaml new file mode 100644 index 0000000..d1d7c02 --- /dev/null +++ b/releasenotes/notes/suse-support-7919a5e43ebdd793.yaml @@ -0,0 +1,5 @@ +--- +features: + - The pip_install role now support SUSE based distributions. + Required packages can now be installed using the `zypper` + package manager. diff --git a/tasks/pre_install.yml b/tasks/pre_install.yml index 655e344..f059ba4 100644 --- a/tasks/pre_install.yml +++ b/tasks/pre_install.yml @@ -22,11 +22,14 @@ # Under CentOS, this will add the repo and its key to the keyring # Under Ubuntu, this will only add the key +# Under SUSE, it will do nothing - name: Install external repo key with package package: name: "{{ pip_install_external_repo_key_package }}" state: "{{ pip_install_package_state }}" - when: user_external_repo_key is not defined + when: + - user_external_repo_key is not defined + - ansible_pkg_mgr != 'zypper' tags: - add-repo-keys diff --git a/vars/suse.yml b/vars/suse.yml new file mode 100644 index 0000000..628a909 --- /dev/null +++ b/vars/suse.yml @@ -0,0 +1,26 @@ +--- +# Copyright 2017, SUSE LINUX GmbH. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +pip_install_distro_build_packages: + - gcc + - libffi-devel + - libopenssl-devel + - python-devel + - python-pyasn1 + - python-pyOpenSSL + +pip_required_pip_packages: + - ndg-httpsclient # SSL SNI support + - requests # SSL SNI support