From 1986e9ed89ba92a34e1ab7142e6566dfb1de0cff Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 26 Nov 2018 23:25:27 -0800 Subject: [PATCH] Fix lookup_passwordstore test skipping. (#49178) * Fix lookup_passwordstore test skipping. Skip all of RHEL instead of specific versions. Skip all of CentOS < 7 instead of specific versions. This makes the test more robust when testing newer versions. Tests could be executed on RHEL if EPEL was installed during the test. (cherry picked from commit 704dae2cda5ef3a7303b37de7bb0004f0a2ba581) --- test/integration/targets/lookup_passwordstore/aliases | 1 + .../targets/lookup_passwordstore/tasks/main.yml | 10 ++++++---- .../targets/lookup_passwordstore/vars/main.yml | 4 ---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/integration/targets/lookup_passwordstore/aliases b/test/integration/targets/lookup_passwordstore/aliases index ca7c912851..d1597d2d97 100644 --- a/test/integration/targets/lookup_passwordstore/aliases +++ b/test/integration/targets/lookup_passwordstore/aliases @@ -1,2 +1,3 @@ shippable/posix/group2 destructive +skip/rhel diff --git a/test/integration/targets/lookup_passwordstore/tasks/main.yml b/test/integration/targets/lookup_passwordstore/tasks/main.yml index 2f39bb637d..1177714a04 100644 --- a/test/integration/targets/lookup_passwordstore/tasks/main.yml +++ b/test/integration/targets/lookup_passwordstore/tasks/main.yml @@ -1,4 +1,6 @@ -- include: "package.yml" - when: "ansible_distribution_version not in passwordstore_skip_os.get(ansible_distribution, [])" -- include: "tests.yml" - when: "ansible_distribution_version not in passwordstore_skip_os.get(ansible_distribution, [])" +- block: + - include: "package.yml" + - include: "tests.yml" + when: + - not (ansible_distribution == 'RedHat') # requires EPEL + - not (ansible_distribution == 'CentOS' and ansible_distribution_version is version_compare('7', '<')) diff --git a/test/integration/targets/lookup_passwordstore/vars/main.yml b/test/integration/targets/lookup_passwordstore/vars/main.yml index 69f347ead7..aa464879ef 100644 --- a/test/integration/targets/lookup_passwordstore/vars/main.yml +++ b/test/integration/targets/lookup_passwordstore/vars/main.yml @@ -56,7 +56,3 @@ passwordstore_privkey: | SxHTvI2pKk+gx0FB8wWhd/CocAHJpx9oNUs/7A== =ZF3O -----END PGP PRIVATE KEY BLOCK----- -passwordstore_skip_os: - Ubuntu: ['12.04'] - RedHat: ['7.4'] - CentOS: ['6.9', '6.10']