-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
42 lines (39 loc) · 948 Bytes
/
playbook.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
---
- name: Pull and run flask image
hosts: all
remote_user: azureuser
tasks:
- name: Pull flask image
docker_image:
name: hargovind04/spe_flask:latest
source: pull
- name: Running flask image
docker_container:
name: flask
image: hargovind04/spe_flask:latest
state: started
restart: yes
restart_policy : always
env:
APP_NAME: "app"
exposed_ports:
- "8080"
- name: Pull and run nginx image
hosts: all
remote_user: azureuser
tasks:
- name: Pull nginx image
docker_image:
name: hargovind04/spe_nginx:latest
source: pull
- name: Running nginx image
docker_container:
name: nginx
image: hargovind04/spe_nginx:latest
state: started
restart: yes
restart_policy : always
links:
- "flask:flask"
ports:
- "80:80"