fix(playbooks): replace effectivelywild.technitium_dns collection with ansible.builtin.uri

Collection not installed in Semaphore's Ansible environment.
Direct HTTP API call to Technitium on :5380 is simpler, has no
collection dependency, and is naturally idempotent (add returns ok
on duplicate records).
This commit is contained in:
Hermes Agent service account
2026-06-07 16:17:05 -05:00
parent 791f13fca5
commit edfe594e7e

View File

@@ -81,15 +81,18 @@
# ── Step 3: Create DNS CNAME records ──
- name: Create DNS CNAME record for each hostname
effectivelywild.technitium_dns.technitium_dns_add_record:
api_url: "http://{{ dns_server }}.{{ base_domain }}"
api_token: "{{ vault_technitium_api_key }}"
zone: "{{ base_domain }}"
name: "{{ item }}"
type: "CNAME"
cname: "lightning-lane.{{ base_domain }}"
ttl: 360
validate_certs: false
ansible.builtin.uri:
url: "http://{{ dns_server }}.{{ base_domain }}:5380/api/zones/records/add\
?token={{ vault_technitium_api_key }}\
&domain={{ item }}\
&type=CNAME\
&cname=lightning-lane.{{ base_domain }}\
&ttl=360"
method: GET
return_content: true
status_code: 200
register: dns_result
failed_when: "(dns_result.json.status | default('error')) != 'ok'"
loop: "{{ hostnames }}"
loop_control:
label: "{{ item }}"