# \[WARNING\]: Found variable using reserved name: q

**URL:** <https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073>\
**Category:** Get Help\
**Created:** [February 5, 2025, 9:30am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073 "2025-02-05T09:30:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ildjarn](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@ildjarn](https://forum.ansible.com/u/ildjarn)\
**Post date:** [February 5, 2025, 9:30am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/1 "2025-02-05T09:30:31Z")

</div>

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:

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

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

```

include.yml:

```yaml
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.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 5, 2025, 9:48am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/2 "2025-02-05T09:48:32Z")

</div>

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](https://github.com/ansible/ansible/commit/819e437d967e33f7331cbc28e7d18920f7fa5740)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 5, 2025, 9:50am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/3 "2025-02-05T09:50:35Z")

</div>

(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](https://github.com/ansible/ansible/pull/84543#issuecomment-2636242869))

---

<div class="post-metadata">

**Author:** ![ildjarn](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@ildjarn](https://forum.ansible.com/u/ildjarn)\
**Post date:** [February 5, 2025, 2:20pm UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/4 "2025-02-05T14:20:30Z")

</div>

Apparently already known:

> <https://github.com/ansible/ansible/issues/84623>
>
> \> This should probably be \`warn\_if\_reserved(\[varname\])\`
> \> 
> \>  
> 
> \_Originally pos…ted by @domq in \[20baf29\](https://github.com/ansible/ansible/commit/20baf29a2a34dec10f7bf1865a666f81eb4ed78a#r151856223)\_

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 5, 2025, 8:43pm UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/5 "2025-02-05T20:43:05Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![xibriz](https://avatars.discourse-cdn.com/v4/letter/x/7bcc69/32.png) [@xibriz](https://forum.ansible.com/u/xibriz)\
**Post date:** [April 23, 2025, 5:20am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/6 "2025-04-23T05:20:45Z")

</div>

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

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

```

Coming from these variables:

```auto
---
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.

---

<div class="post-metadata">

**Author:** ![Jon\_Morby](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jon_morby/32/9532_2.png) [@Jon\_Morby](https://forum.ansible.com/u/Jon_Morby)\
**Post date:** [September 30, 2025, 12:45pm UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/7 "2025-09-30T12:45:28Z")

</div>

Likewise, I’m seeing the same warnings with ansible [core 2.19.2]

source .env && /opt/homebrew/bin/ansible-playbook zimbra.yml

PLAY [Configure Zimbra Node(s)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: Found variable using reserved name ‘serial’.  
Origin:

serial

[WARNING]: Found variable using reserved name ‘tags’.  
Origin:

tags

Again we’re using Netbox (v4.4.1)

---

<div class="post-metadata">

**Author:** ![ildjarn](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@ildjarn](https://forum.ansible.com/u/ildjarn)\
**Post date:** [October 1, 2025, 6:14am UTC](https://forum.ansible.com/t/warning-found-variable-using-reserved-name-q/40073/8 "2025-10-01T06:14:32Z")

</div>

This is unrelated. Warnings about reserved names has been enabled for quite some time, the original message was a bug that would mark _any_ variable with a q as reserved, your message is about a specific variable name.
