mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-12-16 05:10:36 +00:00
added fluentd::install
This commit is contained in:
parent
0a015155a9
commit
0f777de271
@ -45,13 +45,21 @@
|
||||
class fluentd (
|
||||
$ensure = $::fluentd::params::ensure,
|
||||
$manage_repo = $::fluentd::params::manage_repo,
|
||||
$package_ensure = $::fluentd::params::package_ensure,
|
||||
$package_name = $::fluentd::params::package_name,
|
||||
$package_install_options = $::fluentd::params::package_install_options,
|
||||
) inherits fluentd::params {
|
||||
|
||||
validate_string($ensure)
|
||||
validate_bool($manage_repo)
|
||||
validate_string($package_ensure)
|
||||
validate_string($package_name)
|
||||
validate_array($package_install_options)
|
||||
|
||||
if $manage_repo {
|
||||
class { '::fluentd::repo': }
|
||||
}
|
||||
|
||||
class { '::fluentd::install': }
|
||||
|
||||
}
|
||||
|
11
manifests/install.pp
Normal file
11
manifests/install.pp
Normal file
@ -0,0 +1,11 @@
|
||||
# Configure package
|
||||
#
|
||||
class fluentd::install inherits fluentd {
|
||||
|
||||
package { 'fluentd':
|
||||
ensure => $package_ensure,
|
||||
name => $package_name,
|
||||
install_options => $package_install_options,
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
class fluentd::params {
|
||||
$ensure = 'present'
|
||||
|
||||
$package_ensure = 'installed'
|
||||
$package_name = 'td-agent'
|
||||
$package_install_options = []
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
case $::operatingsystem {
|
||||
|
Loading…
Reference in New Issue
Block a user