-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
feature: Add possibilty to not manage the openvpn service with puppet. #158
Conversation
hasstatus => true, | ||
class openvpn::service ($manage_service = true) { | ||
|
||
if $manage_service { |
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.
Instead of adding a parameter, please reference $::openvpn::manage_service
directly (as you do for the systemd part.
Well, the approach seems okay for me. I only had one comment, please check. |
I added it as parameter so I do not have to worry about the existing test case which invokes the service class directly. I'll give it another go. |
You can handle this with a precondition: let(:pre_condition) { 'class { "openvpn": manage_service => true }' } |
Hmm does not seem to work that way... Any idea? |
Expand the facts to be like this, then it should work... let(:facts) do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:concat_basedir => '/var/lib/puppet/concat'
}
end |
Now it looks better, thank you. Sorry this rspec stuff is pretty new to me, I do not yet fully understand the concepts and structure of these tests. |
When you have redundant pairs of firewalls you sometimes want to use other means to start/stop the service (i.e. keepalived scripts).
feature: Add possibilty to not manage the openvpn service with puppet.
Thanks for your work! Looks good! I will add a reverse test to complete it. |
When you have redundant pairs of firewalls you sometimes want to use
other means to start/stop the service (i.e. keepalived scripts).
This is primarly a request for comments. If somebody has a better approach,
I'd be happy to dig into it.