refactor(nfc_kubernetes): layout role ingress to install prime -> master -> worker nodes as separate groups

!37
This commit is contained in:
2024-03-13 22:29:42 +09:30
parent 7e86574684
commit 32c3f7ab71
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
---
- name: Install/Configure Kubernetes Prime Master Node
ansible.builtin.include_tasks:
file: install.yaml
tags:
- always
when:
kubernetes_config.cluster.prime.name | default(inventory_hostname) == inventory_hostname
and
nfc_role_kubernetes_prime | bool
- name: Install/Configure Kubernetes on remaining Master Nodes
ansible.builtin.include_tasks:
file: install.yaml
tags:
- always
when:
kubernetes_config.cluster.prime.name | default(inventory_hostname) != inventory_hostname
and
nfc_role_kubernetes_master | bool
- name: Install/Configure Kubernetes on Worker Nodes
ansible.builtin.include_tasks:
file: install.yaml
tags:
- always
when: >
nfc_role_kubernetes_worker | bool
and
not nfc_role_kubernetes_prime | bool
and
not nfc_role_kubernetes_master | bool