variable rename

This commit is contained in:
Tim 2017-07-05 10:29:29 +02:00
parent 904a45b7e6
commit beb2a1304f
4 changed files with 10 additions and 8 deletions

View file

@ -76,7 +76,7 @@ kube_network_plugin: weave
weave_password: ~t94S:mweJN}32-K
# Set true for use weave's seed mode
mode_seed: false
weave_mode_seed: true
# Enable kubernetes network policies
enable_network_policy: false

View file

@ -3,5 +3,5 @@
# For reset values :
# seed: unset
# peers: unset
seed: unset
peers: unset
seed: fa:16:3e:b5:ea:aa,fa:16:3e:47:29:c6
peers: 192.168.208.13 192.168.208.9

View file

@ -2,7 +2,7 @@
- include: pre-upgrade.yml
- include: seed.yml
when: mode_seed == true
when: weave_mode_seed == true
- name: Weave | enable br_netfilter module
modprobe:

View file

@ -64,10 +64,12 @@ items:
spec:
containers:
- name: weave
{% if mode_seed == true %}
command: ["/bin/sh","-c","export EXTRA_ARGS=--name=$(cat /sys/class/net/{{ ansible_default_ipv4['interface'] }}/address) && /home/weave/launch.sh"]
{% else %}
command:
{% if weave_mode_seed == true %}
- /bin/sh
- -c
- export EXTRA_ARGS=--name=$(cat /sys/class/net/ens3/address) && /home/weave/launch.sh
{% else %}
- /home/weave/launch.sh
{% endif %}
env:
@ -78,7 +80,7 @@ items:
fieldPath: spec.nodeName
- name: IPALLOC_RANGE
value: {{ kube_pods_subnet }}
{% if mode_seed == true %}
{% if weave_mode_seed == true %}
- name: KUBE_PEERS
value: {{ weave_peers }}
- name: IPALLOC_INIT