mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
231f9c0283
* multiple improvements
* added changelog fragment
* comment and name in int test files
* added notes to the documentation
* removed the extraneous changelog frag
* Update plugins/modules/web_infrastructure/apache2_module.py
* adjusted doc text for sanity check
* Update plugins/modules/web_infrastructure/apache2_module.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* removed extraneous dependency in integration test
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d9533c44aa
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
44 lines
1.3 KiB
YAML
44 lines
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 #
|
|
####################################################################
|
|
|
|
|
|
- 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
|