From 0a16c9cd4ac6849e638643f6e8fbfd5fafc2a697 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Mon, 11 Aug 2025 07:58:37 +0100 Subject: 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. --- playbook.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbook.yaml') 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 -- cgit v1.2.3