-
Notifications
You must be signed in to change notification settings - Fork 0
/
weave.yml
50 lines (46 loc) · 1.2 KB
/
weave.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
43
44
45
46
47
48
49
50
---
- hosts: jupiter
become: yes
tasks:
- file: path=/bin/weave state=absent
- get_url: url=https://git.io/weave dest=/bin/weave mode=777
- service: name=docker state=restarted
- name: forward
shell: iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited
ignore_errors: yes
- name: input
shell: iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited
ignore_errors: yes
- shell: iptables-save
- name: weave launch
shell: weave launch 10.0.0.1
#- hosts: hermes
# become: yes
# tasks:
# - shell: weave launch
- hosts: hermes:artemis:ares:athena:maia
become: yes
vars:
weave_env:
DOCKER_HOST: unix:///var/run/weave/weave.sock
tasks:
- name: connect new host
environment: "{{weave_env}}"
shell: weave connect 10.0.0.{{ item }}
with_items:
- 6
- hosts: jupiter
become: yes
vars:
weave_env:
DOCKER_HOST: unix:///var/run/weave/weave.sock
tasks:
- name: connect to weaveNet
environment: "{{weave_env}}"
shell: weave connect 10.0.0.{{ item }}
with_items:
- 2
- 3
- 4
- 5
when: ansible_eth1.ipv4.address != '10.0.0.{{ item }}'