fix(public_dns): index loop keys with item['key'] not item.key
item.values resolved to the dict's built-in .values() METHOD, not the 'values' key, so gandi_livedns received '<built-in method values of dict object at 0x..>' as the TXT value — garbage AND non-idempotent (the address changes each run). Bracket-index all loop fields. Caught only by the live apply (apply=false Molecule + data-only pytest both missed it). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
078d1ad9d9
commit
76bd1d63fc
1 changed files with 8 additions and 8 deletions
|
|
@ -13,27 +13,27 @@
|
||||||
- name: Ensure desired records are present (Gandi LiveDNS)
|
- name: Ensure desired records are present (Gandi LiveDNS)
|
||||||
community.general.gandi_livedns:
|
community.general.gandi_livedns:
|
||||||
domain: "{{ public_dns__domain }}"
|
domain: "{{ public_dns__domain }}"
|
||||||
record: "{{ item.record }}"
|
record: "{{ item['record'] }}"
|
||||||
type: "{{ item.type }}"
|
type: "{{ item['type'] }}"
|
||||||
values: "{{ item.values }}"
|
values: "{{ item['values'] }}"
|
||||||
ttl: "{{ item.ttl | default(public_dns__default_ttl) }}"
|
ttl: "{{ item['ttl'] | default(public_dns__default_ttl) }}"
|
||||||
state: present
|
state: present
|
||||||
personal_access_token: "{{ vault.gandi.pat }}"
|
personal_access_token: "{{ vault.gandi.pat }}"
|
||||||
loop: "{{ public_dns__records }}"
|
loop: "{{ public_dns__records }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.record }} {{ item.type }}"
|
label: "{{ item['record'] }} {{ item['type'] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: public_dns__apply | bool
|
when: public_dns__apply | bool
|
||||||
|
|
||||||
- name: Ensure unwanted records are absent (Gandi LiveDNS)
|
- name: Ensure unwanted records are absent (Gandi LiveDNS)
|
||||||
community.general.gandi_livedns:
|
community.general.gandi_livedns:
|
||||||
domain: "{{ public_dns__domain }}"
|
domain: "{{ public_dns__domain }}"
|
||||||
record: "{{ item.record }}"
|
record: "{{ item['record'] }}"
|
||||||
type: "{{ item.type }}"
|
type: "{{ item['type'] }}"
|
||||||
state: absent
|
state: absent
|
||||||
personal_access_token: "{{ vault.gandi.pat }}"
|
personal_access_token: "{{ vault.gandi.pat }}"
|
||||||
loop: "{{ public_dns__absent }}"
|
loop: "{{ public_dns__absent }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.record }} {{ item.type }}"
|
label: "{{ item['record'] }} {{ item['type'] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: public_dns__apply | bool
|
when: public_dns__apply | bool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue