New in version 1.6.
- a2enmod
- a2dismod
parameter | required | default | choices | comments |
---|---|---|---|---|
force (added in 2.1) |
no |
|
force disabling of default modules and override Debian warnings
|
|
ignore_configcheck (added in 2.3) |
no |
|
Ignore configuration checks about inconsistent module configuration. Especially for mpm_* modules.
|
|
name |
yes |
name of the module to enable/disable
|
||
state |
no | present |
|
indicate the desired state of the resource
|
# 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
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
warnings |
list of warning messages
|
when needed | list | |
stdout |
stdout of underlying command
|
failed | string | |
result |
message about action taken
|
always | string | |
stderr |
stderr of underlying command
|
failed | string | |
rc |
return code of underlying command
|
failed | int |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.