test(public_dns): Molecule scenario (apply disabled, no live API)
Converge runs in CI; the no-op apply=false scenario adds no local signal over the pytest, and the test image is on an unreachable registry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a0a3e4d356
commit
e247af6e55
2 changed files with 14 additions and 6 deletions
|
|
@ -2,6 +2,13 @@
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
vars:
|
||||||
|
public_dns__apply: false # never call the Gandi API from a container
|
||||||
|
public_dns__domain: example.test
|
||||||
|
public_dns__records:
|
||||||
|
- {record: "@", type: MX, values: ["0 ."], ttl: 3600}
|
||||||
|
- {record: "@", type: TXT, values: ['"v=spf1 -all"'], ttl: 3600}
|
||||||
|
public_dns__absent:
|
||||||
|
- {record: www, type: CNAME}
|
||||||
roles:
|
roles:
|
||||||
- role: public_dns
|
- role: public_dns
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Add verification tasks here
|
- name: Role variables resolved
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that: true
|
that:
|
||||||
msg: "Replace this with real assertions"
|
- public_dns__domain == "example.test"
|
||||||
|
- public_dns__apply | bool == false
|
||||||
|
msg: "public_dns defaults/vars did not resolve as expected"
|
||||||
tags: [verify]
|
tags: [verify]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue