From 704dae2cda5ef3a7303b37de7bb0004f0a2ba581 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. --- test/integration/targets/lookup_passwordstore/aliases | 2 +- .../targets/lookup_passwordstore/tasks/main.yml | 10 ++++++---- .../targets/lookup_passwordstore/vars/main.yml | 4 ---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/integration/targets/lookup_passwordstore/aliases b/test/integration/targets/lookup_passwordstore/aliases index 67d9297b79d..d1597d2d975 100644 --- a/test/integration/targets/lookup_passwordstore/aliases +++ b/test/integration/targets/lookup_passwordstore/aliases @@ -1,3 +1,3 @@ shippable/posix/group2 destructive -skip/rhel8.0 +skip/rhel diff --git a/test/integration/targets/lookup_passwordstore/tasks/main.yml b/test/integration/targets/lookup_passwordstore/tasks/main.yml index 2f39bb637da..1177714a04d 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 69f347ead74..aa464879eff 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']