-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache_webserver_pb.yml
56 lines (45 loc) · 1.1 KB
/
apache_webserver_pb.yml
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
48
49
50
51
52
53
54
55
56
- hosts: myweb
vars_files:
-"vars.yml"
tasks:
- file:
state: directory
path: "/{{ dvd_dir }}"
- mount:
src: "/dev/cdrom"
path: "/{{ dvd_dir }}"
state: mounted
fstype: "iso9660"
- yum_repository:
baseurl: "/{{ dvd_dir }}/AppStream"
name: "AppStream"
description: "AppStream softwares"
gpgcheck: no
- yum_repository:
baseurl: "//{{ dvd_dir }}/BaseOS"
name: "BaseOS"
description: "BaseOS softwares"
gpgcheck: no
- package:
name: "httpd"
state: present
when: os_name == "RedHat"
- copy:
dest: "{{ doc_root }}/index.html"
content: "Hello world"
- template:
dest: "/etc/httpd/conf.d/web.conf"
src: "web.conf"
notify:
- Restart httpd
- firewalld:
port: "{{ port }}/tcp"
state: enabled
permanent: yes
immediate: yes
handlers:
- name: Restart httpd
service:
name: "httpd"
state: "restarted"
enabled: yes