-
Notifications
You must be signed in to change notification settings - Fork 0
/
master_spark.yml
35 lines (34 loc) · 1018 Bytes
/
master_spark.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
---
- hosts: hermes
gather_facts: no
become: yes
vars:
weave_env:
DOCKER_HOST: unix:///var/run/weave/weave.sock
tasks:
#- yum: name=python-pip state=latest
#- pip: state=present name=docker-py
- file: path=/srv/spark/tmp recurse=yes state=directory mode=0755
- firewalld: port=7077/tcp permanent=true state=enabled
- name: erase master
environment: "{{weave_env}}"
docker:
name: sparkmaster
image: registry.o-labs.ru/spark_master
state: absent
- name: spark master
environment: "{{weave_env}}"
docker:
name: sparkmaster
image: registry.o-labs.ru/spark_master
state: started
pull: always
volumes:
- "/srv/spark/tmp:/tmp"
ports:
- "8080:8080"
- "7077:7077"
restart_policy: always
restart_policy_retry: 5
- name: resolver
shell: docker exec sparkmaster bash -c "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf"