Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.apache2_module
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
force boolean |
| Force disabling of default modules and override Debian warnings. |
identifier string | Identifier of the module as listed by apache2ctl -M . This is optional and usually determined automatically by the common convention of appending _module to name as well as custom exception for popular modules. | |
ignore_configcheck boolean |
| Ignore configuration checks about inconsistent module configuration. Especially for mpm_* modules. |
name string / required | Name of the module to enable/disable as given to a2enmod/a2dismod . | |
state string |
| Desired state of the module. |
- name: Enable the Apache2 module wsgi community.general.apache2_module: state: present name: wsgi - name: Disables the Apache2 module wsgi community.general.apache2_module: state: absent name: wsgi - name: Disable default modules for Debian community.general.apache2_module: state: absent name: autoindex force: True - name: Disable mpm_worker and ignore warnings about missing mpm module community.general.apache2_module: state: absent name: mpm_worker ignore_configcheck: True - name: Enable dump_io module, which is identified as dumpio_module inside apache2 community.general.apache2_module: state: present name: dump_io identifier: dumpio_module
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
rc integer | failed | return code of underlying command |
result string | always | message about action taken |
stderr string | failed | stderr of underlying command |
stdout string | failed | stdout of underlying command |
warnings list / elements=string | when needed | list of warning messages |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/apache2_module_module.html