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

Fix side affect in that the eyaml will always be first for backend lookups #216

Merged
merged 4 commits into from
Mar 28, 2018
Merged

Conversation

mcmartins
Copy link
Contributor

The following seems not being applied:

  • #the requested_backends has a side affect in that the eyaml will always be
  • #first for backend lookups. This can be fixed by specifing the order in
  • #the backends parameter ie. ['yaml', 'eyaml', 'redis']

When we specify an order:

hiera::backends:
  - consul
  - eyaml
  - yaml

eyaml is always included as first and the hiera.yaml generated comes as:

:backends:
- eyaml
- consul
- yaml

The fix applied was to ignore the concat if eyaml is already present in the user defined backends.

The following seems not being applied:

# the requested_backends has a side affect in that the eyaml will always be
# first for backend lookups.  This can be fixed by specifing the order in
# the backends parameter ie. ['yaml', 'eyaml', 'redis']

When we specify an order:
```yaml
hiera::backends:
  - consul
  - eyaml
  - yaml
```

eyaml is always included as first and the hiera.yaml generated comes as:

```yaml
:backends:
- eyaml
- consul
- yaml
``` 

The fix applied was to ignore the concat if eyaml is already present in the user defined backends.
@bastelfreak bastelfreak added the bug Something isn't working label Mar 28, 2018
@bastelfreak
Copy link
Member

Thanks for the patch @mcmartins !

@bastelfreak bastelfreak merged commit 22e4426 into voxpupuli:master Mar 28, 2018
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.

2 participants