* feat: smol changes Signed-off-by: Devin Buhl <devin@buhl.casa> * feat!: Rewrite configure script in ansible Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: add comment for real path Signed-off-by: Devin Buhl <devin@buhl.casa> * feat: verification is done Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: do not need net common Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: clean up old comments Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: clean up old comments Signed-off-by: Devin Buhl <devin@buhl.casa> * feat: finish up ansible host generation and more Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: backup/restore sops config between tasks Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: clean up test comments Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: use ansible template on template Signed-off-by: Devin Buhl <devin@buhl.casa> * Update template/vars/config.sample.yaml Co-authored-by: Manuel Rüger <manuel@rueg.eu> * Update template/tasks/verify_cli.yaml * chore: update readme Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: update readme Signed-off-by: Devin Buhl <devin@buhl.casa> * Update README.md Co-authored-by: Manuel Rüger <manuel@rueg.eu> * fix: move bcrypt logic to template Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: derp Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa> Co-authored-by: Manuel Rüger <manuel@rueg.eu>
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
---
|
|
- name: Query Cloudflare zone
|
|
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
|
|
ansible.builtin.assert:
|
|
that: ["result.json.success == true"]
|
|
success_msg: "Cloudflare zone {{ bootstrap_cloudflare_domain }} exists"
|
|
fail_msg: "Cloudflare zone {{ bootstrap_cloudflare_domain }} does not exist"
|
|
|
|
- name: Query Cloudflared tunnel
|
|
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
|
|
ansible.builtin.assert:
|
|
that: ["result.json.success == true"]
|
|
success_msg: "Cloudflared tunnel {{ bootstrap_cloudflare_tunnel_id }} exists"
|
|
fail_msg: "Cloudflared tunnel {{ bootstrap_cloudflare_tunnel_id }} does not exist"
|