ansible/test/integration/targets/apache2_module/tasks/main.yml
Robin Roth ec80f8ad80 Add identifier option to apache2_module (#33748)
* Add identifier option to apache2_module

There is a convention connecting the name passed to a2enmod and the one
appearing in apache2ctl -M. Not all modules follow this convention and
we have added a growing list of implicit conversions.
As a better long-term solution this adds an "identifier" option to be
able to set both strings explicitly.

* Run debian-specific tests only there

* Improve cleanup after apache2 tests

This is a follow-up/extension of https://github.com/ansible/ansible/pull/33630

* Add example for the new identifier option

* Put all debian tests in a block
2018-01-23 18:56:59 +01:00

21 lines
610 B
YAML

---
- name:
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
- debug: var=modules_before
- 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