ansible/playbooks/pik8s.yml

60 lines
1.8 KiB
YAML
Executable File

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# k8s
- hosts: tags_pik8s
gather_facts: no
roles:
- role: k8s
tags: [ k8s, skip-pull ]
- role: backup
vars:
backup_s3backup_list_extra:
- /etc/kubernetes
tags: [ k8s, backup ]
- hosts: tags_pik8s-master
gather_facts: no
tasks:
- name: install openshift
pip: name=openshift state=latest
tags: [ k8s, packages, pip ]
- hosts: tags_pik8s-node
gather_facts: no
roles:
- role: keepalived
vars:
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"
- 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"
- name: VI_4
state: "{{ keepalived_state | default('BACKUP') }}"
interface: eth0
virtual_router_id: 54
priority: "{{ keepalived_priority }}"
advert_int: 1
auth_pass: "{{ secret_keepalived_pass }}"
vip: "192.168.102.240/16"
tags: [ k8s, keepalived ]