Files
home-cluster/bootstrap/tasks/validation/vars.yaml
T
Oscar RomeuandDevin Buhl 78746180bc feat(ansible): add branch reference as variable in gitrepository (#919)
* feat: add branch reference as variable in gitrepository

* Update bootstrap/vars/config.sample.yaml

---------

Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
2023-08-27 12:10:02 -04:00

38 lines
1.3 KiB
YAML

---
- name: Verify required bootstrap vars are set
ansible.builtin.assert:
that: 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 }}"