Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dnsmasq configuration fails with ...({{ item.when }}): 'item' is undefined #525

Open
kmpm opened this issue Feb 7, 2023 · 0 comments

Comments

@kmpm
Copy link

kmpm commented Feb 7, 2023

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"}

Here is my playbook.

#fmt: ansible-playbook
- name: Consul Cluster
  hosts: consul_instances
  any_errors_fatal: true
  become: true
  vars:
    consul_dnsmasq_enable: true
    consul_tls_enable: true
    consul_tls_ca_crt: consul-agent-ca.pem
    consul_tls_server_crt: dc1-server-consul-0.pem
    consul_tls_server_key: dc1-server-consul-0-key.pem
    consul_raw_key: "*****"
  roles:
    - ansible-community.ansible-consul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant