On a fresh ubuntu 22.04 I got an error when creating dnsmasq config.
TASK [ansible-community.ansible-consul : Create Dnsmasq configuration] **********************************************************************************************************************************************************
[WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ item.when }}
fatal: [hashi1]: FAILED! => {"msg": "The conditional check '{{ item.when }}' failed. The error was: error while evaluating conditional ({{ item.when }}): 'item' is undefined\n\nThe error appears to be in '/home/me/code/ansible-hashicorp/roles/ansible-community.ansible-consul/tasks/dnsmasq.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create Dnsmasq configuration\n ^ here\n"}
On a fresh ubuntu 22.04 I got an error when creating dnsmasq config.
Here is my playbook.