8000 Replace Jinja2 sequence checks with mapping (dictionary) checks by alessfg · Pull Request #189 · nginx/ansible-role-nginx-config · GitHub
[go: up one dir, main page]

Skip to content

Conversation

alessfg
Copy link
Member
@alessfg alessfg commented Oct 27, 2021

Proposed changes

Dictionaries are a sequence per Jinja2 contrary to Python's defaults (dictionaries are not a sequence in Python). The template conditionals assumed the latter. This PR replaces all sequence checks with mapping (dictionary) checks.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have added Molecule tests that prove my fix is effective or that my feature works
  • I have checked that any relevant Molecule tests pass after adding my changes
  • I have updated any relevant documentation (defaults/main/*.yml, README.md and CHANGELOG.md)

@alessfg alessfg self-assigned this Oct 27, 2021
@alessfg alessfg added the bug Something isn't working label Oct 27, 2021
@alessfg alessfg added this to the 0.4.2 milestone Oct 27, 2021
@alessfg alessfg merged commit 767db05 into main Oct 27, 2021
@alessfg alessfg deleted the dictionaries-are-a-sequence-too branch October 27, 2021 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0