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 hiera array merge sorting commands #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsfrerot
Copy link

@jsfrerot jsfrerot commented Mar 1, 2016

Hiera deep merge sorts the command array causing issues if the "ALL" keyword is at the end of the line when we have disallowed commands.
commands"=>["/usr/bin/puppet", "/bin/puppet", "!SHELLS", "!SU", "ALL"]
In this case SHELLS and SU will not be disallowed...
Also making sure the disallowed commands are at the end.

I'm not a ruby programmer, if you feel this code can be improve feel free to do so.

Hiera deep merge sorts the command array causing issues if the "ALL" keyword is at the end of the line when we have disallowed commands.
commands"=>["/usr/bin/puppet", "/bin/puppet", "!SHELLS", "!SU", "ALL"]
In this case SHELLS and SU will not be disallowed...
Also making sure the disallowed commands are at the end.

I'm not a ruby programmer, if you feel this code can be improve feel free to do so.
@rendhalver
Copy link
Member

Thanks for that.
I will have a look and see how it works.
At first glance it looks good.

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

Successfully merging this pull request may close these issues.

2 participants