39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
---
|
|
- name: Verify required bootstrap vars are set
|
|
ansible.builtin.assert:
|
|
that:
|
|
- vars[item] is defined
|
|
- vars[item] | default('', true) | trim != ''
|
|
success_msg: Required bootstrap var {{ item }} exists and is defined
|
|
fail_msg: Required bootstrap var {{ item }} does not exists or is not defined
|
|
loop:
|
|
- bootstrap_acme_email
|
|
- bootstrap_age_public_key
|
|
- bootstrap_cloudflare_account_tag
|
|
- bootstrap_cloudflare_domain
|
|
- bootstrap_cloudflare_token
|
|
- bootstrap_cloudflare_tunnel_id
|
|
- bootstrap_cloudflare_tunnel_secret
|
|
- bootstrap_cluster_cidr
|
|
- bootstrap_flux_github_webhook_token
|
|
- bootstrap_github_repository_name
|
|
- bootstrap_github_repository_branch
|
|
- bootstrap_github_username
|
|
- bootstrap_external_ingress_addr
|
|
- bootstrap_internal_ingress_addr
|
|
- bootstrap_ipv6_enabled
|
|
- bootstrap_k8s_gateway_addr
|
|
- bootstrap_kube_vip_addr
|
|
- bootstrap_node_cidr
|
|
- bootstrap_service_cidr
|
|
- bootstrap_timezone
|
|
|
|
- name: Verify bootstrap node names are valid
|
|
ansible.builtin.assert:
|
|
that: item.name is match('^[a-z0-9-]+$')
|
|
success_msg: Node name {{ item.name }} is valid
|
|
fail_msg: Node name {{ item.name }} is not valid
|
|
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
|
loop_control:
|
|
label: "{{ item.name }}"
|