Skip to content

Ensure compatibility with ansible 2.23: Jinja constant strings should not contain embedded templates #713

Description

@max-nuding

Ansible warns me when running my playbook:

Origin: ~/.ansible/collections/ansible_collections/prometheus/prometheus/roles/prometheus/tasks/preflight.yml:81:25

79 - name: Discover latest version
80   ansible.builtin.set_fact:
81     prometheus_version: "{{ (lookup('url', 'https://api.github.com/repos/{{ _prometheus_repo}}/releases/latest', h...
                           ^ column 25

Use inline expressions, for example: `msg: "{{ lookup('env', '{{ a_var }}') }}"` becomes `msg: "{{ lookup('env', a_var) }}"`

with the note that:

This feature will be disabled by default in ansible-core 2.23.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions