mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-06 10:21:34 +02:00
Renamed general and mode constants and implemented a check to verify that constants are just defined ones over the whole repository
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
url: "{{ cf_api_url }}?name={{ domain | to_primary_domain }}"
|
||||
method: GET
|
||||
headers:
|
||||
Authorization: "Bearer {{ certbot_dns_api_token }}"
|
||||
Authorization: "Bearer {{ CERTBOT_DNS_API_TOKEN }}"
|
||||
Content-Type: "application/json"
|
||||
return_content: yes
|
||||
register: cf_zone_lookup_dev
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
- name: activate cloudflare cache development mode
|
||||
include_tasks: "cloudflare/02_enable_cf_dev_mode.yml"
|
||||
when: (INFINITO_ENVIRONMENT | lower) == 'development'
|
||||
when: (ENVIRONMENT | lower) == 'development'
|
||||
|
||||
- name: purge cloudflare domain cache
|
||||
include_tasks: "cloudflare/01_cleanup.yml"
|
||||
when: mode_cleanup | bool
|
||||
when: MODE_CLEANUP | bool
|
@@ -3,7 +3,7 @@
|
||||
url: "https://api.cloudflare.com/client/v4/zones/{{ cf_zone_id }}/purge_cache"
|
||||
method: POST
|
||||
headers:
|
||||
Authorization: "Bearer {{ certbot_dns_api_token }}"
|
||||
Authorization: "Bearer {{ CERTBOT_DNS_API_TOKEN }}"
|
||||
Content-Type: "application/json"
|
||||
body:
|
||||
purge_everything: true
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# roles/srv-proxy-6-6-domain/tasks/02_enable_cf_dev_mode.yml
|
||||
---
|
||||
# Enables Cloudflare Development Mode (bypasses cache for ~3 hours).
|
||||
# Uses the same auth token as in 01_cleanup.yml: certbot_dns_api_token
|
||||
# Uses the same auth token as in 01_cleanup.yml: CERTBOT_DNS_API_TOKEN
|
||||
# Assumes `domain` and (optionally) `cf_zone_id` are available.
|
||||
# Safe to run repeatedly; only changes when the mode is not already "on".
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
url: "https://api.cloudflare.com/client/v4/zones/{{ cf_zone_id }}/settings/development_mode"
|
||||
method: GET
|
||||
headers:
|
||||
Authorization: "Bearer {{ certbot_dns_api_token }}"
|
||||
Authorization: "Bearer {{ CERTBOT_DNS_API_TOKEN }}"
|
||||
Content-Type: "application/json"
|
||||
return_content: yes
|
||||
register: cf_dev_mode_current
|
||||
@@ -20,7 +20,7 @@
|
||||
url: "https://api.cloudflare.com/client/v4/zones/{{ cf_zone_id }}/settings/development_mode"
|
||||
method: PATCH
|
||||
headers:
|
||||
Authorization: "Bearer {{ certbot_dns_api_token }}"
|
||||
Authorization: "Bearer {{ CERTBOT_DNS_API_TOKEN }}"
|
||||
Content-Type: "application/json"
|
||||
body:
|
||||
value: "on"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
when: run_once_srv_proxy_6_6_domain is not defined
|
||||
|
||||
- include_tasks: "01_cloudflare.yml"
|
||||
when: dns_provider == "cloudflare"
|
||||
when: DNS_PROVIDER == "cloudflare"
|
||||
|
||||
- include_tasks: "{{ playbook_dir }}/tasks/utils/load_handlers.yml"
|
||||
vars:
|
||||
|
Reference in New Issue
Block a user