community / community.general / 0.1.1 / module / apache2_module Enables/disables a module of the Apache2 webserver. Authors: Christian Berendt (@berendt), Ralf Hertel (@n0trax), Robin Roth (@robinro) preview | supported by communitycommunity.general.apache2_module (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Enables or disables a specified module of the Apache2 webserver.
# enables the Apache2 module "wsgi" - apache2_module: state: present name: wsgi
# disables the Apache2 module "wsgi" - apache2_module: state: absent name: wsgi
# disable default modules for Debian - apache2_module: state: absent name: autoindex force: True
# disable mpm_worker and ignore warnings about missing mpm module - apache2_module: state: absent name: mpm_worker ignore_configcheck: True
# enable dump_io module, which is identified as dumpio_module inside apache2 - apache2_module: state: present name: dump_io identifier: dumpio_module
name: description: - Name of the module to enable/disable as given to C(a2enmod/a2dismod). required: true force: default: false description: - Force disabling of default modules and override Debian warnings. required: false type: bool state: choices: - present - absent default: present description: - Desired state of the module. identifier: description: - Identifier of the module as listed by C(apache2ctl -M). This is optional and usually determined automatically by the common convention of appending C(_module) to I(name) as well as custom exception for popular modules. required: false ignore_configcheck: default: false description: - Ignore configuration checks about inconsistent module configuration. Especially for mpm_* modules. type: bool
rc: description: return code of underlying command returned: failed type: int result: description: message about action taken returned: always type: str stderr: description: stderr of underlying command returned: failed type: str stdout: description: stdout of underlying command returned: failed type: str warnings: description: list of warning messages returned: when needed type: list