Files
home-cluster/bootstrap/tasks/validation/cloudflare.yaml
T
Devin Buhl 2f9e6068d3 feat: attempt to add a e2e workflow (#1143)
* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: attempt to add a e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-12 22:41:03 -05:00

39 lines
1.4 KiB
YAML

---
- name: Query Cloudflare zone
when: not ci_test | default(false)
ansible.builtin.uri:
url: https://api.cloudflare.com/client/v4/zones?name={{ bootstrap_cloudflare_domain }}&status=active
headers:
Authorization: Bearer {{ bootstrap_cloudflare_token }}
Content-Type: application/json
timeout: 5
return_content: true
body_format: json
register: result
- name: Check if Cloudflare zone exists
when: not ci_test | default(false)
ansible.builtin.assert:
that: result.json.success is true
success_msg: Cloudflare zone {{ bootstrap_cloudflare_domain }} exists
fail_msg: Cloudflare zone {{ bootstrap_cloudflare_domain }} does not exist
- name: Query Cloudflared tunnel
when: not ci_test | default(false)
ansible.builtin.uri:
url: https://api.cloudflare.com/client/v4/accounts/{{ bootstrap_cloudflare_account_tag }}/cfd_tunnel/{{ bootstrap_cloudflare_tunnel_id }}
headers:
Authorization: Bearer {{ bootstrap_cloudflare_token }}
Content-Type: application/json
timeout: 5
return_content: true
body_format: json
register: result
- name: Check if Cloudflared tunnel exists
when: not ci_test | default(false)
ansible.builtin.assert:
that: result.json.success is true
success_msg: Cloudflared tunnel {{ bootstrap_cloudflare_tunnel_id }} exists
fail_msg: Cloudflared tunnel {{ bootstrap_cloudflare_tunnel_id }} does not exist