Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5 # This test represent the misleading behavior of the following issue: https://github.com/ansible-collections/community.general/issues/635
6 - name: Disable MPM event module
7 apache2_module:
8 name: "{{ item.module}}"
9 state: "{{ item.state}}"
10 ignore_configcheck: true
11 register: disable_mpm_modules
12 with_items:
13 - { module: mpm_event, state: absent }
14 - { module: mpm_prefork, state: present }
15
16 - assert:
17 that:
18 - "'warnings' in disable_mpm_modules"
19 - disable_mpm_modules["warnings"] == [
20 "No MPM module loaded! apache2 reload AND other module actions will fail if no MPM module is loaded immediately.",
21 "No MPM module loaded! apache2 reload AND other module actions will fail if no MPM module is loaded immediately."
22 ]
23
24 - name: Enable MPM event module - Revert previous change
25 apache2_module:
26 name: "{{ item.module}}"
27 state: "{{ item.state}}"
28 ignore_configcheck: true
29 register: disable_mpm_modules
30 with_items:
31 - { module: mpm_prefork, state: absent }
32 - { module: mpm_event, state: present }
33
34 - name: Disable MPM event module
35 apache2_module:
36 name: "{{ item.module}}"
37 state: "{{ item.state}}"
38 ignore_configcheck: true
39 warn_mpm_absent: false
40 register: disable_mpm_modules
41 with_items:
42 - { module: mpm_event, state: absent }
43 - { module: mpm_prefork, state: present }
44
45 - assert:
46 that:
47 - "'warnings' not in disable_mpm_modules"