Skip to content

chore(preflight): Use vars lookups - #793

Open
plamerdimak wants to merge 2 commits into
prometheus-community:mainfrom
plamerdimak:vars-warns
Open

chore(preflight): Use vars lookups#793
plamerdimak wants to merge 2 commits into
prometheus-community:mainfrom
plamerdimak:vars-warns

Conversation

@plamerdimak

Copy link
Copy Markdown

Hello,

I noticed this while installing the role.

Thanks for your feedback.


When installing the node exporter, the following warning show up:

[DEPRECATION WARNING]: The internal "vars" dictionary is deprecated. This feature will be removed from ansible-core version 2.24.
Origin: /tmp/.ansible/collections/ansible_collections/prometheus/prometheus/roles/_common/tasks/preflight.yml:14:9
12   ansible.builtin.assert:
13     that:
14       - __common_parent_role_short_name ~ '_skip_install' not in vars

           ^ column 9
[...]
Use the `vars` and `varnames` lookups instead.

Indeed, Ansible advises to use vars lookups for these assertion checks.

Use vars lookups.

Link: ansible/ansible#85673

When installing the node exporter, the following warning show up:

    [DEPRECATION WARNING]: The internal "vars" dictionary is deprecated. This feature will be removed from ansible-core version 2.24.
    Origin: /tmp/.ansible/collections/ansible_collections/prometheus/prometheus/roles/_common/tasks/preflight.yml:14:9
    12   ansible.builtin.assert:
    13     that:
    14       - __common_parent_role_short_name ~ '_skip_install' not in vars

               ^ column 9
    [...]
    Use the `vars` and `varnames` lookups instead.

Indeed, Ansible advises to use vars lookups for these assertion checks.

Use `vars` lookups.

Link: ansible/ansible#85673
Signed-off-by: Plamerdi Makela <plamerdi447@gmail.com>
@willbuckner

Copy link
Copy Markdown
Contributor

I raised #869 since this had been sitting for a while, but I don't mean to step on something you're already working on, so if you want to get the tests passing on this one we can use yours instead of mine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment