-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapache-web-server.yml
More file actions
41 lines (41 loc) · 971 Bytes
/
apache-web-server.yml
File metadata and controls
41 lines (41 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- name: configure apache web server
hosts: 192.168.1.104
tasks:
- name: install apache packages
yum:
name: httpd
state: present
tags:
- tag-1
- name: Start apache service
service:
name: httpd
state: started
tags:
- tag-2
- name: add firewall rules
firewalld:
port: 80/tcp
permanent: true
state: enabled
tags:
- tag-3
- name : reload firewall config for new rule
systemd:
name: firewalld
state: reloaded
tags:
- tag-3
- name: copy index file to apache directory
copy:
src: /tmp/index.html
dest: /var/www/html/
tags:
- tag-4
- name: restart apache service
service:
name: httpd
state: restarted
tags:
- tag-5