Add some work on loadbalancer

This commit is contained in:
Adrien Reslinger 2019-07-19 09:06:44 +02:00
parent 507bdfca63
commit b2e96c59da
3 changed files with 47 additions and 2 deletions

View file

@ -19,7 +19,7 @@
with_items:
- { lbip: '{{ lbip_kubeapiserver }}', state: "MASTER", interface: '{{ lb_interface }}', auth_pass: '{{ lb_auth_pass }}' }
when:
- groups['Kube-masters'][0] == ansible_hostname
- groups['KubernetesMasters'][0] == ansible_hostname
notify: Restart keepalived
- name: Install keepalived config file
template:
@ -28,5 +28,5 @@
with_items:
- { lbip: '{{ lbip_kubeapiserver }}', state: "BACKUP", interface: '{{ lb_interface }}', auth_pass: '{{ lb_auth_pass }}' }
when:
- not groups['Kube-masters'][0] == ansible_hostname
- not groups['KubernetesMasters'][0] == ansible_hostname
notify: Restart keepalived