mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	refactor: replace srv-web-7-7-dns-records with sys-dns-cloudflare-records
- removed obsolete role `srv-web-7-7-dns-records` (README, meta, tasks) - updated Gitea role to use `sys-dns-cloudflare-records` with explicit record vars - updated web-opt-rdr-www role to use new DNS role with zone detection (`to_zone`) - added REDIRECT_WWW_FLAVOR var to support "edge" flavor selection
This commit is contained in:
		| @@ -18,10 +18,21 @@ | ||||
|  | ||||
| - name: Include DNS role to set redirects | ||||
|   include_role: | ||||
|     name: srv-web-7-7-dns-records | ||||
|     name: sys-dns-cloudflare-records | ||||
|   vars: | ||||
|     CLOUDFLARE_API_TOKEN: "{{ CLOUDFLARE_API_TOKEN }}" | ||||
|     cloudflare_domains: "{{ www_domains }}" | ||||
|     cloudflare_target_ip: "{{ networks.internet.ip4 }}" | ||||
|     cloudflare_proxied: false | ||||
|     cloudflare_records: | | ||||
|       {%- set bare = www_domains | map('regex_replace', '^www\\.(.+)$', '\\1') | list -%} | ||||
|       [ | ||||
|       {%- for d in bare -%} | ||||
|         { | ||||
|           "type": "A", | ||||
|           "zone": "{{ d | to_zone }}", | ||||
|           "name": "{{ d }}", | ||||
|           "content": "{{ networks.internet.ip4 }}", | ||||
|           "proxied": false, | ||||
|           "ttl": 1 | ||||
|         }{{ "," if not loop.last else "" }} | ||||
|       {%- endfor -%} | ||||
|       ] | ||||
|   when: DNS_PROVIDER == 'cloudflare' | ||||
|  | ||||
|   | ||||
| @@ -1 +1,2 @@ | ||||
| application_id: "web-opt-rdr-www" | ||||
| application_id:       "web-opt-rdr-www" | ||||
| REDIRECT_WWW_FLAVOR:  "edge" | ||||
		Reference in New Issue
	
	Block a user