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

Add confd_dir parameter #758

Merged
merged 1 commit into from
Jul 26, 2017
Merged

Add confd_dir parameter #758

merged 1 commit into from
Jul 26, 2017

Conversation

bodgit
Copy link
Contributor

@bodgit bodgit commented Jul 19, 2017

This PR adds support for setting CONFD_DIR in /etc/default/sensu to be able to have multiple configuration directories. I have a use case where I want Puppet to create an additional configuration directory but not have it subject to the same management or purging rules as the default one. See sensu/sensu-omnibus#216 which explains why it's not the documented CONFIG_DIR variable.

To keep my employers legal team happy, I have to include the following:

This contribution is provided 'as is' and without any warranty or guarantee of any kind, express or implied, including in relation to its quality, suitability for a particular purpose or non-infringement. To the extent permitted by law, in no event shall the creator of this contribution be liable for any claim, damage or other liability, whether arising in contract, tort or otherwise, arising out of or in connection with this contribution.

@ghoneycutt
Copy link
Collaborator

@bodgit Awesome work, thanks for contributing. We recently adopted Puppet 4 data types, could you please rebase against master.

@@ -157,6 +158,11 @@
it { should contain_file('/etc/default/sensu').with_content(%r{^PATH=/spec/tests$}) }
end

context 'confd_dir => /spec/tests' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since confd_dir can be a string or array, we should test for both.

@bodgit bodgit force-pushed the confd_dir branch 2 times, most recently from 90ee862 to 1fb49d3 Compare July 21, 2017 13:35
@bodgit
Copy link
Contributor Author

bodgit commented Jul 21, 2017

Updated to use an appropriate Puppet 4 data type and testing both single value and array of values.

@ghoneycutt
Copy link
Collaborator

Apologies to ask again, but could you please rebase and squash your commits. I'll get this merged in next so there will not be any more conflicts.

Thank you!

@bodgit
Copy link
Contributor Author

bodgit commented Jul 25, 2017

Done.

@ghoneycutt ghoneycutt merged commit 03c54f2 into sensu:master Jul 26, 2017
@ghoneycutt
Copy link
Collaborator

Thanks @bodgit !!

Released in v2.29.0

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