mirror of https://github.com/ansible/ansible.git
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 blockpull/35240/head
parent
ad8ee4e60f
commit
ec80f8ad80
@ -1,20 +0,0 @@
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
- name: uninstall libapache2-mod-evasive via apt
|
||||
apt:
|
||||
name: libapache2-mod-evasive
|
||||
state: absent
|
||||
when: "ansible_os_family == 'Debian'"
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue