-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy_nginx.yml
38 lines (34 loc) · 955 Bytes
/
deploy_nginx.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
---
- hosts: localhost
connection: local
gather_facts: False
vars:
app:
id: nginx
instances: 1
cpus: 1
mem: 128
container:
type: "DOCKER"
docker:
image: "nginx:latest"
network: "BRIDGE"
privileged: false
forcePullImage: true
portMappings:
- containerPort: 80
hostPort: 0
healthChecks: []
upgradeStrategy:
maximumOverCapacity: 0
minimumHealthCapacity: 0
labels:
"MARATHON_SINGLE_INSTANCE_APP": "true"
# TODO: Ensure marathon python module is installed on the control machine
# pre_tasks:
# - shell: pip install -r roles/marathon-deploy/requirements.txt
roles:
- marathon-deploy
tasks:
- name: run Nginx on marathon
marathon: uri=http://{{ hostvars['master01.tera.local'].ansible_host }}:8080 app='{{ app | to_json }}' state=present