-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite_var.yaml
47 lines (38 loc) · 1.05 KB
/
site_var.yaml
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
42
43
44
45
46
47
---
- name: Install the apache httpd Service
hosts: all
become: yes
vars:
web_pkg: httpd
firewall_pkg: firewalld
web_service: httpd
firewall_service: httpd
tasks:
- name: install latest packages
yum:
name:
- "{{ web_pkg }}"
- "{{ firewall_pkg }}"
state: latest
- name: The {{ web_service }} start and enable
service:
name: "{{ web_service }}"
state: started
enabled: true
- name: The {{ firewall_service }} start and enable
service:
name: "{{ firewall_service }}"
state: started
enabled: true
- name: write content to remote servers
copy:
content: 'Welcome to OUR official WEBSITE'
dest: /var/www/html/index.html
- name: Allow http port from the firewalld service
firewalld:
service: http
zone: public
permanent: yes
state: enabled
immediate: yes
...