Add workaround for evasive in apache2_module (#22649)

* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
This commit is contained in:
Robin Roth 2017-04-04 20:12:06 +02:00 committed by Brian Coca
commit 6f40cb9647
3 changed files with 59 additions and 18 deletions

View file

@ -15,9 +15,12 @@
- name: install apache via apt
apt:
name: apache2
name: "{{item}}"
state: present
when: "ansible_os_family == 'Debian'"
with_items:
- apache2
- libapache2-mod-evasive
- name: install apache via zypper
zypper:
@ -84,4 +87,11 @@
name: autoindex
state: absent
force: True
when: "ansible_os_family != 'Suse'"
when: "ansible_os_family == 'Debian'"
- name: enable evasive module, test https://github.com/ansible/ansible/issues/22635
apache2_module:
name: evasive
state: present
when: "ansible_os_family == 'Debian'"