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