-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost-provision.yaml
More file actions
68 lines (58 loc) · 1.4 KB
/
Copy pathpost-provision.yaml
File metadata and controls
68 lines (58 loc) · 1.4 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
---
- hosts: all
gather_facts: yes
pre_tasks:
- name: install boto3/botocore
pip:
name:
- boto3
- botocore
state: latest
extra_args: --user
tasks:
- name: Install preliminary packages
dnf:
name:
- python3-urllib3
- python3
- jq
- wget
- vim
- perl-devel
- make
- nfs-utils
- bc
- ghostscript
state: latest
become: true
- name: copy httpd.conf
copy:
src: files/httpd.conf
dest: /etc/httpd/conf/httpd.conf
mode: 0644
become: true
- name: init mount dirs
shell: |
#Assets Mount
mkdir -p /var/www/sites-files
chown apache:apache /var/www/sites-files
chmod 755 /var/www/sites-files
#ebs mount
mkdir -p /var/www/html
chmod 755 /var/www/html
become: true
- name: Add firewalld rules for ssh,http,https
shell: |
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --add-port=443/tcp --permanent
sudo firewall-cmd --add-port=22/tcp --permanent
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --reload
become: true
- name: Upgrade all packages
dnf:
name: "*"
state: latest
become: true