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 manage_service parameter #149

Merged
merged 3 commits into from
Nov 13, 2019
Merged

Add manage_service parameter #149

merged 3 commits into from
Nov 13, 2019

Conversation

flyingstar16
Copy link
Contributor

This allows users to decide whether the module should manage the
dns service. The check defaults to true, but in case users want to
manage the service autonomously they can.
This also solves "duplicate declaration" issues when the service
is declared in another .pp file

This does not influence package installation.

This allows users to decide whether the module should manage the
dns service. The check defaults to true, but in case users want to
manage the service autonomously they can.
This also solves "duplicate declaration" issues when the service
is declared in another .pp file

This does not influence package installation.
manifests/init.pp Outdated Show resolved Hide resolved
@flyingstar16
Copy link
Contributor Author

@ekohl Ok, I've pointed all the calls to Class['dns::service'] and added tests to dns_init_spec.rb for the manage_service parameter.
Can you have a look and let me know if those tests are enough?
I tried adding tests in dns_zone_spec.rb but rspec correctly informed me that you can't test a parameter that the class doesn't have...

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Overall 👍

@@ -38,7 +38,7 @@
:group => 'named',
:mode => '0644',
:replace => 'false',
:notify => 'Service[named]',
:notify => 'Class[Dns::Service]',
Copy link
Member

Choose a reason for hiding this comment

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

A more correct way of checking uses the catalog. I realize this was already incorrect, but I'd appreciate it if you fixed it while changing this part

Suggested change
:notify => 'Class[Dns::Service]',
).that_notifies('Class[Dns::Service]')

@flyingstar16
Copy link
Contributor Author

Sorry about the horrible delay on a one-line fix :/ Should be ok now! :)

@mmoll mmoll merged commit 849821d into theforeman:master Nov 13, 2019
@mmoll
Copy link
Contributor

mmoll commented Nov 13, 2019

merged, thanks @flyingstar16!

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

Successfully merging this pull request may close these issues.

4 participants