community.general icon indicating copy to clipboard operation
community.general copied to clipboard

apache2_module: module fails even when the module is already present and config check is false

Open julien-lecomte opened this issue 2 years ago • 4 comments

Summary

The implicit contract of this ansible module is to have the apache2 module installed at the end of it's run.

In case the configuration is broken, for example with sites-enabled that require modules that are net yet activated, then the module fails.

When specifying ignore_configcheck, the module still fails, and especially doesn't install the missing module.

check_mode apart, the status of the apache a2enmod (when it exists) can be used to detect and set the apache2_module exit code.

Issue Type

Bug Report

Component Name

apache2_module

Ansible Version

$ ansible --version
ansible 2.9.27
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]

Community.general Version

$ ansible-galaxy collection list community.general

Configuration

$ ansible-config dump --only-changed

OS / Environment

Debiab 10 + Debian 11

Steps to Reproduce


Expected Results

cf. description

Actual Results


Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

julien-lecomte avatar Apr 29 '22 09:04 julien-lecomte