This commit is contained in:
parent
48e99ac551
commit
d4dac488f9
7 changed files with 298 additions and 279 deletions
|
|
@ -1,21 +1,21 @@
|
|||
---
|
||||
- name: Install needed packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- keepalived
|
||||
- curl
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
notify: Restart keepalived
|
||||
- name: Install check_apiserver.sh script for keepalived
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: etc/keepalived/check_apiserver.sh.j2
|
||||
dest: /etc/keepalived/check_apiserver.sh
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
- name: Install keepalived config file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: etc/keepalived/keepalived.conf.j2
|
||||
dest: /etc/keepalived/keepalived.conf
|
||||
owner: root
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
- groups['KubernetesMasters'][0] == ansible_hostname
|
||||
notify: Restart keepalived
|
||||
- name: Install keepalived config file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: etc/keepalived/keepalived.conf.j2
|
||||
dest: /etc/keepalived/keepalived.conf
|
||||
owner: root
|
||||
|
|
@ -40,4 +40,4 @@
|
|||
notify: Restart keepalived
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue