This change explicitly sets cluster_ip as rancher agent source ip.
This avoids eventual problems with ip autodetection, especially that
we know the correct ip.
Change-Id: I473f022c56301cefeb98ccb5bb94d78e7ac491a7
Issue-ID: OOM-1906
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
- name: Converge rancher agent
hosts: kubernetes
roles:
+ - prepare-common
- role: rancher
vars:
mode: agent
name: rancher_agent
image: "{{ server_hostvars.rancher_agent_image }}"
command: "{{ server_hostvars.rancher_agent_reg_url }}"
+ env:
+ CATTLE_AGENT_IP: "{{ cluster_ip }}"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/rancher:/var/lib/rancher"