@ -46,10 +46,12 @@ The roles workflow is as follows
|
|||||||
|
|
||||||
1. Create required config files needed for installation
|
1. Create required config files needed for installation
|
||||||
|
|
||||||
1. _(kubernetes prime only)_ Add install required config files
|
1. _(kubernetes prime master only)_ Add install required config files
|
||||||
|
|
||||||
1. Install kubernetes
|
1. Install kubernetes
|
||||||
|
|
||||||
|
1. _(kubernetes prime master only)_ Wait for kubernetes to be ready. Playbook is paused until `true`
|
||||||
|
|
||||||
1. Configure Kubernetes
|
1. Configure Kubernetes
|
||||||
|
|
||||||
If the playbook is setup as per [our recommendation](ansible.md) step 2 onwards is first done on master nodes then worker nodes.
|
If the playbook is setup as per [our recommendation](ansible.md) step 2 onwards is first done on master nodes then worker nodes.
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
aptInstall:
|
aptInstall:
|
||||||
- name: curl
|
- name: curl
|
||||||
- name: iptables
|
- name: iptables
|
||||||
|
- name: jq
|
||||||
|
|
||||||
|
|
||||||
- name: Create Required directories
|
- name: Create Required directories
|
||||||
@ -183,6 +184,26 @@
|
|||||||
and
|
and
|
||||||
not Kubernetes_Master | default(false) | bool
|
not Kubernetes_Master | default(false) | bool
|
||||||
|
|
||||||
|
|
||||||
|
- name: Wait for kubernets to be ready
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: |
|
||||||
|
set -o pipefail
|
||||||
|
if [ `which jq` ]; then echo $(kubectl get no $(hostname) -o json | jq .status.conditions[4].status | tr -d '"'); else echo jq command not found; exit 127; fi
|
||||||
|
executable: /bin/bash
|
||||||
|
register: kubernetes_ready_check
|
||||||
|
retries: 30
|
||||||
|
delay: 10
|
||||||
|
until: >
|
||||||
|
kubernetes_ready_check.stdout | default(false) | bool
|
||||||
|
or
|
||||||
|
kubernetes_ready_check.rc != 0
|
||||||
|
changed_when: false
|
||||||
|
failed_when: kubernetes_ready_check.rc != 0
|
||||||
|
when: >
|
||||||
|
kubernetes_config.cluster.prime.name == inventory_hostname
|
||||||
|
|
||||||
|
|
||||||
- name: Set Kubernetes Final Install Fact
|
- name: Set Kubernetes Final Install Fact
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
kubernetes_installed: true
|
kubernetes_installed: true
|
||||||
|
|||||||
Reference in New Issue
Block a user