From 31e3b8197f7821b259897ce75d552cdbf3e389fd Mon Sep 17 00:00:00 2001 From: Eike Frost Date: Thu, 7 Dec 2017 17:32:28 +0100 Subject: [PATCH] zabbix_host: fix integration tests only working individually (#33630) * remove mod_evasive which is potentially installed by apache2_module integration test and add zabbix_host to CI --- .../targets/apache2_module/tasks/cleanup.yml | 20 +++++++++++++++++++ .../targets/apache2_module/tasks/main.yml | 9 +++++++-- test/integration/targets/zabbix_host/aliases | 1 + 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 test/integration/targets/apache2_module/tasks/cleanup.yml diff --git a/test/integration/targets/apache2_module/tasks/cleanup.yml b/test/integration/targets/apache2_module/tasks/cleanup.yml new file mode 100644 index 00000000000..21fbb6002d7 --- /dev/null +++ b/test/integration/targets/apache2_module/tasks/cleanup.yml @@ -0,0 +1,20 @@ +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . + +- name: uninstall libapache2-mod-evasive via apt + apt: + name: libapache2-mod-evasive + state: absent + when: "ansible_os_family == 'Debian'" diff --git a/test/integration/targets/apache2_module/tasks/main.yml b/test/integration/targets/apache2_module/tasks/main.yml index 590fc726e3a..5e6512ad80d 100644 --- a/test/integration/targets/apache2_module/tasks/main.yml +++ b/test/integration/targets/apache2_module/tasks/main.yml @@ -1,6 +1,11 @@ --- -- name: include only on supported systems - include: actualtest.yml +- name: + block: + - name: include only on supported systems + include: actualtest.yml + always: + - name: cleanup installed modules + include: cleanup.yml when: ansible_os_family in ['Debian', 'Suse'] # centos/RHEL does not have a2enmod/a2dismod diff --git a/test/integration/targets/zabbix_host/aliases b/test/integration/targets/zabbix_host/aliases index 3b26eaa5de0..c9a649c10c2 100644 --- a/test/integration/targets/zabbix_host/aliases +++ b/test/integration/targets/zabbix_host/aliases @@ -1,4 +1,5 @@ destructive +posix/ci/group1 skip/osx skip/freebsd skip/rhel