Add additional tests to configure the module and verify that it started successfully

Related: #1964892
This commit is contained in:
Coty Sutherland 2021-08-03 19:48:40 -04:00
parent 5206eb1969
commit 3ecb5784c0
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,12 @@
---
- name: Install required packages
dnf:
name: >
httpd, mod_proxy_cluster
- name: Comment out mod_proxy_balancer
command: sed -i 's@LoadModule proxy_balancer_module@#LoadModule proxy_balancer_module@g' /etc/httpd/conf.modules.d/00-proxy.conf
- name: Configure mod_proxy_cluster
command: mv /etc/httpd/conf.d/mod_cluster.conf.sample /etc/httpd/conf.d/mod_cluster.conf

View File

@ -3,14 +3,18 @@
tags:
- classic
roles:
- role: Test_Setup
- role: standard-test-basic
tests:
- verify_httpd_up:
dir: .
run: "curl http://localhost/ &> testfile.log || true && grep '<strong>Test Page</strong>' testfile.log"
- check_error_log:
- check_error_log_for_unexpected_errors:
dir: .
run: "! sudo grep -i error /var/log/httpd/error_log | grep -v \"AH01276\""
- check_mod_proxy_cluster_configured:
dir: .
run: "grep -e \"mod_cluster/.* configured -- resuming normal operations\" /var/log/httpd/error_log"
required_packages:
- mod_proxy_cluster
- httpd