-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.yaml
47 lines (38 loc) · 1.03 KB
/
web.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
- name: web installation
hosts: web
become: yes
tasks:
- name: installing nginx
ansible.builtin.package:
name: nginx
state: present
- name: enabling nginx
ansible.builtin.service:
name: nginx
enabled: yes
state: started
- name: removing html directory
ansible.builtin.file:
path: /usr/share/nginx/html
state: absent
- name: create html directory
ansible.builtin.file:
path: /usr/share/nginx/html
state: directory
- name: Download the frontend content
ansible.builtin.get_url:
url: https://roboshop-builds.s3.amazonaws.com/web.zip
dest: /tmp
- name: extraction application
ansible.builtin.unarchive:
src: /tmp/web.zip
dest: /usr/share/nginx/html
remote_src: yes
- name: copy roboshop configuration
ansible.builtin.copy:
src: roboshop.conf
dest: /etc/nginx/default.d/roboshop.conf
- name: restart nginx
ansible.builtin.service:
name: nginx
state: restarted