Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change lists into dicts in the 'vars:' sections of playbooks #5293

Open
1 of 7 tasks
acozine opened this issue Aug 23, 2024 · 0 comments
Open
1 of 7 tasks

Change lists into dicts in the 'vars:' sections of playbooks #5293

acozine opened this issue Aug 23, 2024 · 0 comments

Comments

@acozine
Copy link
Contributor

acozine commented Aug 23, 2024

What maintenance needs to be done?

Some of our playbooks currently have vars sections that are formatted as lists. Like this:

vars:
  - firstvar: firstvalue
  - secondvar: secondvalue

Our current version of Ansible is warning us that, starting in Ansible 2.18, this will not be allowed:

[DEPRECATION WARNING]: Specifying a list of dictionaries for vars is deprecated in favor of specifying a dictionary. This feature will be removed in version 2.18. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

So we need to change those playbooks.

Level of urgency

  • High
  • Moderate
  • Low

Relevant deadlines

If this maintenance relates to an End of Life date or other deadline, please enter it here.

  • As of today, we are using Ansible Core 2.16, which will be EOL in May, 2025
  • Ansible Core 2.17 is the current latest; it will be EOL in November, 2025
  • Ansible Core 2.18 should be released in November of 2024
    See the Ansible Core support matrix for details.

Why is this maintenance needed?

To avoid playbook-breaking errors when we upgrade to Ansible Core 2.18.

Acceptance criteria

  • I can run all playbooks with Ansible Core 2.16 and not see the deprecation warning shown above

Implementation notes, if any

In most playbooks, all that's needed is to remove the - in front of each entry under vars:.

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

No branches or pull requests

1 participant