From 914e205eb35f0e29e58fdf9da666e39c3e81ccbc Mon Sep 17 00:00:00 2001 From: Rowan Wookey Date: Thu, 8 Sep 2016 12:58:11 +0100 Subject: [PATCH] Added work around for Ubuntu Xenial calling php7_module php7.0 --- lib/ansible/modules/web_infrastructure/apache2_module.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ansible/modules/web_infrastructure/apache2_module.py b/lib/ansible/modules/web_infrastructure/apache2_module.py index 16a9998845f..9f9df923e03 100644 --- a/lib/ansible/modules/web_infrastructure/apache2_module.py +++ b/lib/ansible/modules/web_infrastructure/apache2_module.py @@ -80,6 +80,12 @@ def _module_is_enabled(module): 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: module.fail_json(msg="Error executing %s: %s" % (control_binary, stderr))