mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Install Kubernetes 1.11 and go back to Ubuntu Xenial until Bionic is officially supported
This commit is contained in:
parent
5acc7652a9
commit
bf83e675f2
26 changed files with 765 additions and 7 deletions
30
roles/kubernetes/tasks/keepalived.yml
Normal file
30
roles/kubernetes/tasks/keepalived.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Creating /etc/keepalived on master nodes
|
||||
file:
|
||||
path: /etc/keepalived
|
||||
state: directory
|
||||
|
||||
- name: Templating /etc/keepalived/keepalived.conf
|
||||
template:
|
||||
src: keepalived.conf.j2
|
||||
dest: /etc/keepalived/keepalived.conf
|
||||
|
||||
- name: Running keepalived container on masters nodes
|
||||
docker_container:
|
||||
name: keepalived_api
|
||||
image: "chmod666/keepalived:latest"
|
||||
state: started
|
||||
detach: True
|
||||
volumes:
|
||||
- /etc/keepalived/keepalived.conf:/usr/local/etc/keepalived/keepalived.conf
|
||||
capabilities:
|
||||
- NET_ADMIN
|
||||
network_mode: host
|
||||
restart_policy: always
|
||||
|
||||
- name: Wait for keepalived to be started
|
||||
shell: 'docker ps | grep chmod666/keepalived | grep "Up"'
|
||||
register: result
|
||||
until: result.stdout.find("chmod666/keepalived") != -1
|
||||
retries: 18
|
||||
delay: 10
|
||||
Loading…
Add table
Add a link
Reference in a new issue