E537 Change mappings value from a dictionary to a list in the default template by Uko · Pull Request #317 · nginx/ansible-role-nginx-config · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Uko
Copy link
Contributor
@Uko Uko commented Mar 15, 2023

Resolves #316

Proposed changes

The current default template states that the mappings value of the map directive expects a dictionary or a list of dictionaries, while in reality, it works only with a list. As adding secondary support for a single dictionary looks like overkill, I propose to change the template, so both the demo value and a comment reflect that mappings should be used with a list of dictionaries.

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)

Resolve nginx#316 as the template expects a list and won't work with a dictionary
@Uko Uko requested a review from alessfg as a code owner March 15, 2023 12:14
@alessfg alessfg added the bug Something isn't working label Mar 15, 2023
@alessfg alessfg added this to the 0.6.1 milestone Mar 15, 2023
@alessfg
Copy link
Member
alessfg commented Mar 15, 2023

Thanks for the PR! Can you update the Changelog too? Since this is the first PR scheduled for the next release, you will need to include:

## 0.6.1 (Unreleased)

as your changelog header.

@alessfg alessfg self-requested a review March 15, 2023 22:58
@Uko
Copy link
Contributor Author
Uko commented Mar 17, 2023

@alessfg I added a changelog entry as requested

Copy link
Member
@alessfg alessfg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alessfg alessfg merged commit ca2b1b0 into nginx:main Apr 4, 2023
@alessfg alessfg changed the title Change mappings value to a list in the default template Change mappings value from a dictionary to a list in the default template Apr 4, 2023
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.

"mappings" from the "map" directive are not applied to a resulting configuration
2 participants
0