summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2025-08-11 07:58:37 +0100
committerMatthew Fennell <matthew@fennell.dev>2025-08-11 07:58:37 +0100
commit0a16c9cd4ac6849e638643f6e8fbfd5fafc2a697 (patch)
treef6e103853d3c8e81f605b6ead2ce0064f4a2aa43
parent0ab318fcd287cfca56dc220811019db7a7373a25 (diff)
Set domain_with_ds to "" if no parent domain
domain_with_ds is checked against the empty string when checking whether we should define ds_subname. When no parent_domain was found, we setting domain_with_ds to None, which in Ansible 10 was (correctly) failing the domain_with_ds != "" check. However, in Ansible 12, it now fails that check, meaning that Ansible tried to evaluate ds_subname even when domain_with_ds was None, resulting in a type conversion failure. Therefore, make sure that domain_with_ds is always a string, even if parent_domain is undefined, and use the empty string to represent this, as expected in the playbook itself.
-rw-r--r--playbook.yaml2
1 files changed, 1 insertions, 1 deletions
diff --git a/playbook.yaml b/playbook.yaml
index 2c8ea28..3ecdf4c 100644
--- a/playbook.yaml
+++ b/playbook.yaml
@@ -461,7 +461,7 @@
{{- parent_domain.json
| map(attribute='name')
| first
- | default(None) -}}
+ | default("") -}}
ds_subname: "{{ virtual_host | regex_replace('.' + domain_with_ds, '') }}"
delegate_host: >-
{{- virtual_host