mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-12 21:50:34 +00:00
added fluentd::install
This commit is contained in:
parent
0a015155a9
commit
0f777de271
@ -43,15 +43,23 @@
|
|||||||
# Copyright 2015 Your name here, unless otherwise noted.
|
# Copyright 2015 Your name here, unless otherwise noted.
|
||||||
#
|
#
|
||||||
class fluentd (
|
class fluentd (
|
||||||
$ensure = $::fluentd::params::ensure,
|
$ensure = $::fluentd::params::ensure,
|
||||||
$manage_repo = $::fluentd::params::manage_repo,
|
$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 {
|
) inherits fluentd::params {
|
||||||
|
|
||||||
validate_string($ensure)
|
validate_string($ensure)
|
||||||
validate_bool($manage_repo)
|
validate_bool($manage_repo)
|
||||||
|
validate_string($package_ensure)
|
||||||
|
validate_string($package_name)
|
||||||
|
validate_array($package_install_options)
|
||||||
|
|
||||||
if $manage_repo {
|
if $manage_repo {
|
||||||
class { '::fluentd::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,5 +1,9 @@
|
|||||||
class fluentd::params {
|
class fluentd::params {
|
||||||
$ensure = 'present'
|
$ensure = 'present'
|
||||||
|
|
||||||
|
$package_ensure = 'installed'
|
||||||
|
$package_name = 'td-agent'
|
||||||
|
$package_install_options = []
|
||||||
|
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Debian': {
|
'Debian': {
|
||||||
|
Loading…
Reference in New Issue
Block a user