Skip package installation when dns_server_package is empty
In my tests, I had a reference to: ensure_packages(['bind', 'bind-utils'], {ensure => 'installed'}) The 'ensure_packages' test inside this module should have worked in conjunction with my test to avoid duplicate package definitions. However, I received:
Error: Duplicate declaration: Package[bind] is already declared; cannot redeclare at /root/proj/puppet/modules/dns/manifests/install.pp:3
I first tried to set the variable name to empty:
class { '::dns': dns_server_package => ''; }
However, that simply caused a puppet syntax error. So I made the change to test for an empty package name and avoid ensure_packages altogether in this fork.
Skip package installation when dns_server_package is empty
In my tests, I had a reference to:
ensure_packages(['bind', 'bind-utils'], {ensure => 'installed'})
The 'ensure_packages' test inside this module should have worked
in conjunction with my test to avoid duplicate package definitions.
However, I received:
I first tried to set the variable name to empty:
However, that simply caused a puppet syntax error. So I made the
change to test for an empty package name and avoid ensure_packages
altogether in this fork.