mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
756c0776d6
* Add parameter warn_mpm_module to control when warning are raised
* Remoe whitespace
* Add changelog fragment
* Add missing license
* Update changelogs/fragments/5793-apache2-module-npm-warnings.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/apache2_module.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/apache2_module.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Refining integration test - previous was invalid
* False to false
* refactor assertion for suse
* Revert "refactor assertion for suse"
This reverts commit 61b86e7493
.
* Excluding test on Suse
Co-authored-by: Felix Fontein <felix@fontein.de>
52 lines
No EOL
1.6 KiB
YAML
52 lines
No EOL
1.6 KiB
YAML
---
|
|
####################################################################
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
####################################################################
|
|
|
|
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
- name: install apache via apt
|
|
apt:
|
|
name: "{{item}}"
|
|
state: present
|
|
when: "ansible_os_family == 'Debian'"
|
|
with_items:
|
|
- apache2
|
|
- libapache2-mod-evasive
|
|
|
|
- name: install apache via zypper
|
|
community.general.zypper:
|
|
name: apache2
|
|
state: present
|
|
when: "ansible_os_family == 'Suse'"
|
|
|
|
- name: test apache2_module
|
|
block:
|
|
- name: get list of enabled modules
|
|
shell: apache2ctl -M | sort
|
|
register: modules_before
|
|
- name: include only on supported systems
|
|
include: actualtest.yml
|
|
always:
|
|
- name: get list of enabled modules
|
|
shell: apache2ctl -M | sort
|
|
register: modules_after
|
|
- name: modules_before
|
|
debug:
|
|
var: modules_before
|
|
- name: modules_after
|
|
debug:
|
|
var: modules_after
|
|
- name: ensure that all test modules are disabled again
|
|
assert:
|
|
that: modules_before.stdout == modules_after.stdout
|
|
when: ansible_os_family in ['Debian', 'Suse']
|
|
# centos/RHEL does not have a2enmod/a2dismod
|
|
|
|
- name: include misleading warning test
|
|
include: 635-apache2-misleading-warning.yml
|
|
when: ansible_os_family in ['Debian']
|
|
# Suse has mpm_event module compiled within the base apache2 |