Skip to content

Commit 3853293

Browse files
author
markramach
committed
Updates to flannel configuration.
1 parent b9d26b6 commit 3853293

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

roles/docker-flannel/tasks/main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,21 @@
1616
flannel_mtu: "{{ flannel_mtu.stdout }}"
1717
flannel_subnet: "{{ flannel_subnet.stdout }}"
1818

19+
- debug: msg={{ flannel_mtu }}
20+
- debug: msg={{ flannel_subnet }}
21+
1922
- name: Shutdown the docker service for a restart.
2023
command: stop docker
24+
ignore_errors: yes
2125

2226
- name: Shutdown the existing docker bridge interface.
2327
command: ip link set dev docker0 down
28+
ignore_errors: yes
2429

2530
- name: Remove the existing docker bridge interface.
2631
command: brctl delbr docker0
27-
32+
ignore_errors: yes
33+
2834
- name: Update docker with flannel configuration.
2935
lineinfile: dest=/etc/default/docker regexp='^DOCKER_OPTS' line='DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock --bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {{ docker_opts }}"'
3036

roles/docker/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- name: Add entry ubuntu 14.04.
1414
lineinfile: dest=/etc/apt/sources.list.d/docker.list line="deb https://apt.dockerproject.org/repo ubuntu-trusty main" regexp="(.*).(dockerproject).(.*)"
1515

16-
- name: Update installed packegs to latest version.
16+
- name: Update installed packages to latest version.
1717
apt: upgrade=yes
1818

1919
- name: Update packages.
@@ -29,4 +29,4 @@
2929
service: name=docker enabled=yes
3030

3131
- name: Ensure docker service is started.
32-
service: name=docker state=started
32+
command: service docker restart

roles/flannel-client/templates/flanneld.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ author "mark ramach"
33

44
script
55

6-
FLANNELD_OPTS="-etcd-endpoints='{{ etcd_endpoint }}' -etcd-prefix='/coreos.com/network'"
6+
FLANNELD_OPTS="-etcd-endpoints={{ etcd_endpoint }} -etcd-prefix=/coreos.com/network"
77

8-
exec flanneld $FLANNELD_OPTS > /var/log/flanneld.log
8+
exec flanneld $FLANNELD_OPTS
99

1010
end script
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
etcd_endpoint: http://127.0.0.1:4001
2-
flannel_network: 10.1.0.0/16
2+
flannel_network: 18.16.0.0/16

roles/flannel/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Download flannel release.
2-
get_url: url={{ flannel_url }} dest=/tmp/{{ flannel_version}}.tar.gz
2+
get_url: url={{ flannel_url }} dest=/tmp/{{ flannel_version}}.tar.gz validate_certs=no
33

44
- name: Unarchive flannel release.
55
unarchive: src=/tmp/{{ flannel_version }}.tar.gz dest=/var/lib/ copy=false group=root owner=root mode=755

0 commit comments

Comments
 (0)