Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Issue #383: Add ensure and enable parameter for forwarder service #390
Issue #383: Add ensure and enable parameter for forwarder service #390
Changes from 3 commits
c830a68
1f8dee5
d5a8432
69f60ed
7fd4281
6287545
2886a05
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only the ensure is a boolean i shall test this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service enable property has different values on different OS'en possible values are true, false, manual, mask or delayed
So it can not be a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is that required? Did you run into any issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running de rspec test locally (on an ubuntu 22.04 bundle exec rake spec) the test on windows fails with the error Provider redhat must have features 'delayed_startable'
I have no idea why the provider redhat was used for the service resource in the rspec test for windows but this seems to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the code and on puppet7 with ruby 2.7 it fails
Error: splunk::forwarder supported operating systems on windows-2012-x86_64 is expected to compile into a catalogue without dependency cycles
Failure/Error: it { is_expected.to compile.with_all_deps }
error during compilation: Parameter enable failed on Service[SplunkForwarder]: Provider redhat must have features 'delayed_startable' to set 'enable' to 'delayed' (file: /home/runner/work/puppet-splunk/puppet-splunk/spec/fixtures/modules/splunk/manifests/forwarder/service.pp, line: 7)
Do you have an other suggestion to fix this or shall i put the selector back in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it by using $facts['service_provider'] as provider and add the fact to the rspec on windows
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb
Check failure on line 107 in spec/acceptance/splunk_forwarder_spec.rb