Use ensure_resources to install pacemaker package

Avoids a potential duplicate Package resource
when both the install and remote modules are used.

Change-Id: I9511c1830b967038721e03dcbb4401cc3059648a
This commit is contained in:
Dan Prince 2017-09-12 11:06:24 -06:00
parent 246b53446a
commit cb9682aed3
2 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ class pacemaker::install (
$ensure = present,
) {
include ::pacemaker::params
package { $::pacemaker::params::package_list:
ensure => $ensure,
}
ensure_resource('package', $::pacemaker::params::package_list, {
ensure => present
})
}

View File

@ -26,9 +26,9 @@
#
class pacemaker::remote ($remote_authkey) {
include ::pacemaker::params
package { $::pacemaker::params::pcmk_remote_package_list:
ensure => installed,
} ->
ensure_resource('package', $::pacemaker::params::pcmk_remote_package_list, {
ensure => present
}) ->
file { 'etc-pacemaker':
ensure => directory,
path => '/etc/pacemaker',