community.general/tests/integration/targets/apache2_module/tasks/main.yml
patchback[bot] d3650f27b0
[PR #9762/a3fd357d backport][stable-10] Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9771)
Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9762)

* Move Apache 2 installation to setup role.

* Make module work with Python 3.

* Add basic tests.

* Add changelog fragment.

* Simplify change.

* Pass referer.

(cherry picked from commit a3fd357d81)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-18 20:30:09 +01:00

37 lines
No EOL
1.3 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: test apache2_module
block:
- name: get list of enabled modules
shell: apache2ctl -M | sort
register: modules_before
- name: include only on supported systems
include_tasks: 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_tasks: 635-apache2-misleading-warning.yml
when: ansible_os_family in ['Debian']
# Suse has mpm_event module compiled within the base apache2