Files
home-cluster/bootstrap/validate.yaml
T
2024-01-15 00:03:41 -05:00

29 lines
960 B
YAML

---
- name: Cluster Installation
hosts: localhost
connection: local
gather_facts: false
vars_files:
- vars/config.yaml
- vars/addons.yaml
tasks:
- name: Get absolute path to this Git repository # noqa: command-instead-of-module
ansible.builtin.command: git rev-parse --show-toplevel
changed_when: false
check_mode: false
register: repository
failed_when: repository.rc != 0
- name: Set facts
ansible.builtin.set_fact:
repository_path: "{{ repository.stdout }}"
- name: Override Kube API address when there is a single master node and no address is defined
when: bootstrap_nodes.master | length == 1 and not bootstrap_kube_api_addr
ansible.builtin.set_fact:
bootstrap_kube_vip_enabled: false
bootstrap_kube_api_addr: "{{ bootstrap_nodes.master[0].address }}"
- name: Verify configuration
ansible.builtin.include_tasks: tasks/validation/main.yaml