Add verify_apache_20260828_080704.yaml
This commit is contained in:
parent
b0c29f789b
commit
df8ff8d17c
32
verify_apache_20260828_080704.yaml
Normal file
32
verify_apache_20260828_080704.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
- hosts: webservers
|
||||||
|
|
||||||
|
vars:
|
||||||
|
http_port: 80
|
||||||
|
max_clients: 200
|
||||||
|
|
||||||
|
remote_user: root
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: ensure apache is at the latest version
|
||||||
|
yum:
|
||||||
|
name: httpd
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: write the apache config file
|
||||||
|
template:
|
||||||
|
src: /srv/httpd.j2
|
||||||
|
dest: /etc/httpd.conf
|
||||||
|
notify:
|
||||||
|
- restart apache
|
||||||
|
|
||||||
|
- name: ensure apache is running
|
||||||
|
service:
|
||||||
|
name: httpd
|
||||||
|
state: started
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: restart apache
|
||||||
|
service:
|
||||||
|
name: httpd
|
||||||
|
state: restarted
|
||||||
Loading…
Reference in New Issue
Block a user