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
Apparently already known:
opened 03:41PM - 28 Jan 25 UTC
closed 06:46PM - 28 Jan 25 UTC
needs_info
needs_template
has_pr
> This should probably be `warn_if_reserved([varname])`
>
>
_Originally pos… ted by @domq in [20baf29](https://github.com/ansible/ansible/commit/20baf29a2a34dec10f7bf1865a666f81eb4ed78a#r151856223)_
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
xibriz
April 23, 2025, 5:20am
6
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.