Skip to content

[Bug]: ansible-inventory --list generates "reserved name" warning for tags #744

@brad2014

Description

@brad2014

Ansible Version

ansible [core 2.20.1]

Ansible Configuration

ALLOW_BROKEN_CONDITIONALS(/Users/me/Projects/ansible/ansible.cfg) = True
ANSIBLE_NOCOLOR(/Users/me/Projects/ansible/ansible.cfg) = True
COLLECTIONS_PATHS(/Users/me/Projects/ansible/ansible.cfg) = ['/Users/me/Projects/ansible']
CONFIG_FILE() = /Users/me/Projects/ansible/ansible.cfg
DEFAULT_FORCE_HANDLERS(/Users/me/Projects/ansible/ansible.cfg) = True
DEFAULT_GATHERING(/Users/me/Projects/ansible/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/Users/me/Projects/ansible/ansible.cfg) = ['/Users/me/Projects/ansible/inventory.test']
DEFAULT_LOAD_CALLBACK_PLUGINS(/Users/me/Projects/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/Users/me/Projects/ansible/ansible.cfg) = /Users/me/Projects/ansible/ansible.log
DEFAULT_NO_TARGET_SYSLOG(/Users/me/Projects/ansible/ansible.cfg) = True
DEPRECATION_WARNINGS(/Users/me/Projects/ansible/ansible.cfg) = False
DIFF_ALWAYS(/Users/me/Projects/ansible/ansible.cfg) = True
INJECT_FACTS_AS_VARS(/Users/me/Projects/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/Users/me/Projects/ansible/ansible.cfg) = auto_silent
INVENTORY_ENABLED(/Users/me/Projects/ansible/ansible.cfg) = ['linode.cloud.instance', 'auto', 'yaml', 'ini']
PERSISTENT_COMMAND_TIMEOUT(/Users/me/Projects/ansible/ansible.cfg) = 60

Effected Components

linode.cloud.instance

Expected Behavior

The simplest dynamic inventory file should work without warnings.

Actual Behavior

With the following minimal inventory file, a warning is generated to stderr by ansible-inventory (and everything else that uses the inventory).

$ ansible-inventory -i inv.linode.yaml --list>/dev/null
[WARNING]: Found variable using reserved name 'tags'.
Origin: <unknown>

tags

Steps to Reproduce

The file inv.linode.yaml is simply:

$ cat inv.linode.yaml 
plugin: linode.cloud.instance
# Filter by tag
api_token: "{{ lookup('env', 'LINODE_CLI_TOKEN') }}"
compose:
  ansible_host: ipv4[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissues that report a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions