ansible/playbooks/pik8s.yml

65 lines
1.9 KiB
YAML
Raw Normal View History

2021-02-28 19:48:42 -06:00
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# k8s
- hosts: pik8s
2021-02-28 21:18:00 -06:00
gather_facts: no
2021-03-01 03:36:23 -06:00
tasks:
- name: install nfs-common
apt: name=nfs-common
tags: [ k8s, packages, apt ]
2021-02-28 19:48:42 -06:00
roles:
- role: k8s
tags: [ k8s, skip-pull ]
- role: motd
vars:
motd_watch_services_extra:
- docker
- kubelet
tags: [ k8s, motd ]
- hosts: pik8s_masters
2021-02-28 21:18:00 -06:00
gather_facts: no
2021-02-28 19:48:42 -06:00
tasks:
- name: install openshift
pip: name=openshift state=latest
tags: [ k8s, packages, pip ]
2021-03-11 10:25:41 -06:00
- hosts: pik8s_nodes
gather_facts: no
roles:
- role: keepalived
vars:
2021-03-24 17:49:25 -05:00
keepalived_stanzas:
- name: VI_1
state: "{{ keepalived_state | default('BACKUP') }}"
interface: eth0
virtual_router_id: 51
priority: "{{ keepalived_priority }}"
advert_int: 1
auth_pass: "{{ secret_keepalived_pass }}"
vip: "192.168.102.200/16"
2021-03-24 17:50:55 -05:00
- name: VI_2
state: "{{ keepalived_state | default('BACKUP') }}"
interface: eth0
virtual_router_id: 52
priority: "{{ keepalived_priority }}"
advert_int: 1
auth_pass: "{{ secret_keepalived_pass }}"
vip: "192.168.102.201/16"
- name: VI_3
state: "{{ keepalived_state | default('BACKUP') }}"
interface: eth0
virtual_router_id: 53
priority: "{{ keepalived_priority }}"
advert_int: 1
auth_pass: "{{ secret_keepalived_pass }}"
vip: "192.168.102.202/16"
2021-04-29 11:48:22 -05:00
- name: VI_4
state: "{{ keepalived_state | default('BACKUP') }}"
interface: eth0
2021-04-29 11:52:28 -05:00
virtual_router_id: 54
2021-04-29 11:48:22 -05:00
priority: "{{ keepalived_priority }}"
advert_int: 1
auth_pass: "{{ secret_keepalived_pass }}"
vip: "192.168.102.240/16"
2021-03-11 10:25:41 -06:00
tags: [ k8s, keepalived ]