mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add workaround for shib2 and php modules
This commit is contained in:
parent
392fa5a7ac
commit
42e63d429c
1 changed files with 13 additions and 6 deletions
|
@ -131,12 +131,6 @@ def _module_is_enabled(module):
|
||||||
|
|
||||||
result, stdout, stderr = module.run_command("%s -M" % control_binary)
|
result, stdout, stderr = module.run_command("%s -M" % control_binary)
|
||||||
|
|
||||||
"""
|
|
||||||
Work around for Ubuntu Xenial listing php7_module as php7.0
|
|
||||||
"""
|
|
||||||
if name == "php7.0":
|
|
||||||
name = "php7"
|
|
||||||
|
|
||||||
if result != 0:
|
if result != 0:
|
||||||
error_msg = "Error executing %s: %s" % (control_binary, stderr)
|
error_msg = "Error executing %s: %s" % (control_binary, stderr)
|
||||||
if ignore_configcheck:
|
if ignore_configcheck:
|
||||||
|
@ -151,6 +145,19 @@ def _module_is_enabled(module):
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg=error_msg)
|
module.fail_json(msg=error_msg)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Work around for php modules; php7.x are always listed as php7_module
|
||||||
|
"""
|
||||||
|
php_module = re.search(r'^(php\d)\.', name)
|
||||||
|
if php_module:
|
||||||
|
name = php_module.group(1)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Workaround for shib2; module is listed as mod_shib
|
||||||
|
"""
|
||||||
|
if re.search(r'shib2', name):
|
||||||
|
return bool(re.search(r' mod_shib', stdout))
|
||||||
|
|
||||||
return bool(re.search(r' ' + name + r'_module', stdout))
|
return bool(re.search(r' ' + name + r'_module', stdout))
|
||||||
|
|
||||||
def _set_state(module, state):
|
def _set_state(module, state):
|
||||||
|
|
Loading…
Reference in a new issue