[WARNING]: Found variable using reserved name: q

Is this a warning that I can ignore?

Environment:
“ansible_playbook_python”: “/usr/bin/python3.12”,
“ansible_python.executable”: “/usr/bin/python3.12”,
“ansible_python_version”: “3.12.8”,
“ansible_version.full”: “2.17.8”

Main file:

---
- name: Test playbook
  hosts: localhost
  gather_facts: false

  tasks:
    - name: Importeer variabelen (Prod)
      ansible.builtin.include_vars:
        file: ./include.yml

include.yml:

varwithaq: test

This results in a warning ‘[WARNING]: Found variable using reserved name: q’
If I change the variable in the included file to ‘varwithanr’ no warning is printed.

1 Like

This seems to be a bug in ansible-core 2.17.8. It does not happen in 2.17.7, or 2.18.0 (or devel, for that matter). It seems to have been introduced here: fix warnings about reserved variable names to cover all sources (#844… · ansible/ansible@819e437 · GitHub

2 Likes

(It does happen with stable-2.18, I added a note here: fix warnings about reserved variable names to cover all sources (#84432) by bcoca · Pull Request #84543 · ansible/ansible · GitHub)

1 Like

Apparently already known:

1 Like

Yep, but until the backports that were created today it was only fixed for devel, not for stable-2.18 or stable-2.17. Now backports exist and the next 2.17.x and 2.18.x releases should not have this (anymore).

1 Like

I’m running ansible [core 2.18.5] and see the follwing errors:

[WARNING]: Found variable using reserved name: tags
[WARNING]: Found variable using reserved name: serial

Coming from these variables:

---
plugin: netbox.netbox.nb_inventory
api_endpoint: https://netbox.com
validate_certs: true
config_context: false
compose:
  netbox_device_tags: tags | default([]) | map(attribute='slug')
  netbox_serial: serial

I’m unsure if it’s netbox_serial that is the problem or serial coming from the Netbox Collection.