mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
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
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
---
|
||||
|
||||
|
||||
- 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: cleanup installed modules
|
||||
include: cleanup.yml
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user