10000 Please emphasise the distinct lack of "ansible_" prefix used in template syntax on the "Discovering variables" page · Issue #1638 · ansible/ansible-documentation · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Please emphasise the distinct lack of "ansible_" prefix used in template syntax on the "Discovering variables" page #1638
Closed
@HouzuoGuo

Description

@HouzuoGuo

The "Discovering variables" page suggests to use setup module to spell out all host facts:

anshot | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [...],
        "ansible_all_ipv6_addresses": [...]

It also illustrates the usage of host facts in an example: {{ ansible_facts['devices']['xvda']['model'] }}

Notably, the dictionary key omits the ansible_ prefix, even though the prefix shows up in the setup module output.

Please add a clarification on the page to emphasise that the lack of ansible_ prefix is working as implemented, and that users should avoid repeating the ansible_ prefix in template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new_contributorThis PR is the first contribution by a new community member.

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0