Add some work on loadbalancer
This commit is contained in:
parent
507bdfca63
commit
b2e96c59da
3 changed files with 47 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue