From ff7a8f8018e798eb822e33773913e2d330be97d3 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 07:27:01 +0200 Subject: [PATCH] [PR #9951/02ffb6e7 backport][stable-9] update PHP apache module workaround (#9978) update PHP apache module workaround (#9951) * update php apache module workaround * Update apache2_module.py * Update apache2_module.py * Update apache2_module.py * add changelog fragment * Update changelogs/fragments/9951-mod-php-identifier.yml Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update 9951-mod-php-identifier.yml --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> (cherry picked from commit 02ffb6e7e39f2adc034b6719bb1d218f479bcaf8) Co-authored-by: simonLeary42 <71396965+simonLeary42@users.noreply.github.com> --- changelogs/fragments/9951-mod-php-identifier.yml | 2 ++ plugins/modules/apache2_module.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/9951-mod-php-identifier.yml diff --git a/changelogs/fragments/9951-mod-php-identifier.yml b/changelogs/fragments/9951-mod-php-identifier.yml new file mode 100644 index 0000000000..29d88091db --- /dev/null +++ b/changelogs/fragments/9951-mod-php-identifier.yml @@ -0,0 +1,2 @@ +minor_changes: + - apache2_module - added workaround for new PHP module name, from ``php7_module`` to ``php_module`` (https://github.com/ansible-collections/community.general/pull/9951). diff --git a/plugins/modules/apache2_module.py b/plugins/modules/apache2_module.py index a9fd72b24f..cf11dc5014 100644 --- a/plugins/modules/apache2_module.py +++ b/plugins/modules/apache2_module.py @@ -196,6 +196,7 @@ def create_apache_identifier(name): # re expressions to extract subparts of names re_workarounds = [ + ('php8', re.compile(r'^(php)[\d\.]+')), ('php', re.compile(r'^(php\d)\.')), ]