Skip to content

Commit 53569f7

Browse files
author
Kyle Decot
committed
Ability to set ensure on the server package
1 parent 9df87d0 commit 53569f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/init.pp

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
# automatically supplied. Otherwise it is required. The URL can be of any
1111
# protocol supported by the nanliu/staging module.
1212
#
13+
# [*package_ensure]
14+
# ensurance of the package
15+
#
1316
# [*package_name*]
1417
# The name of the package(s) as they will exist or be detected on the host.
1518
#
@@ -41,6 +44,7 @@
4144
#
4245
class splunk (
4346
$package_source = $splunk::params::server_pkg_src,
47+
$package_ensure = $splunk::params::server_pkg_ensure,
4448
$package_name = $splunk::params::server_pkg_name,
4549
$logging_port = $splunk::params::logging_port,
4650
$splunkd_port = $splunk::params::splunkd_port,
@@ -67,7 +71,7 @@
6771
}
6872

6973
package { $package_name:
70-
ensure => installed,
74+
ensure => $package_ensure,
7175
provider => $pkg_provider,
7276
source => $pkg_source,
7377
before => Service[$virtual_service],

manifests/params.pp

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@
221221
$forwarder_src_pkg = "splunkforwarder-${package_suffix}"
222222
$server_src_pkg = "splunk-${package_suffix}"
223223

224+
$server_pkg_ensure = 'installed'
224225
$server_pkg_src = "${src_root}/${server_src_subdir}/${server_src_pkg}"
225226
$forwarder_pkg_src = "${src_root}/${forwarder_src_subdir}/${forwarder_src_pkg}"
226227
$create_password = true

0 commit comments

Comments
 (0)