From 542a4dc3961ad57149d6519fb2ef9d93540fae25 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Tue, 19 Feb 2019 02:45:37 +1000 Subject: [PATCH] opensuse - install password-store from specific repo (#52439) (#52441) (cherry picked from commit 4a94bd8d9db2a4fd4a67097370e20dc8e5d90eeb) --- .../lookup_passwordstore/tasks/package.yml | 21 +++++++++++++++---- .../templates/security-privacy.repo.j2 | 7 +++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 test/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 diff --git a/test/integration/targets/lookup_passwordstore/tasks/package.yml b/test/integration/targets/lookup_passwordstore/tasks/package.yml index 75664c38516..fc1752b8df6 100644 --- a/test/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/test/integration/targets/lookup_passwordstore/tasks/package.yml @@ -3,21 +3,34 @@ name: pass state: present when: ansible_pkg_mgr == 'apt' + - name: "Install package" yum: name: pass state: present when: ansible_pkg_mgr == 'yum' + - name: "Install package" dnf: name: pass state: present when: ansible_pkg_mgr == 'dnf' -- name: "Install package" - zypper: - name: password-store - state: present + +- block: + # OpenSUSE Leap>=15.0 don't include password-store in main repo + - name: add security:privacy repo + template: + src: security-privacy.repo.j2 + dest: /etc/zypp/repos.d/security:privacy.repo + + - name: "Install package" + zypper: + name: password-store + state: present + update_cache: yes + disable_gpg_check: yes when: ansible_pkg_mgr == 'zypper' + - name: "Install package" pkgng: name: "{{ item }}" diff --git a/test/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 b/test/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 new file mode 100644 index 00000000000..e698129aa10 --- /dev/null +++ b/test/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 @@ -0,0 +1,7 @@ +[security_privacy] +name=Crypto applications and utilities (openSUSE_Leap_{{ ansible_distribution_version }}) +type=rpm-md +baseurl=http://download.opensuse.org/repositories/security:/privacy/openSUSE_Leap_{{ ansible_distribution_version }}/ +gpgcheck=1 +gpgkey=http://download.opensuse.org/repositories/security:/privacy/openSUSE_Leap_{{ ansible_distribution_version }}/repodata/repomd.xml.key +enabled=1