diff --git a/manifests/init.pp b/manifests/init.pp index b73fd11..2d71eed 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,6 +8,9 @@ # [*repo_manage*] # Include repository to install recent fluentd (td-agent) from # Default: 'true' +# [*repo_version*] +# The major version of td-agent to install +# Default: 3 # [*package_ensure*] # Package ensure # Default: 'installed' @@ -66,6 +69,7 @@ # class fluentd ( Boolean $repo_manage = $::fluentd::params::repo_manage, + Integer $repo_version = $::fluentd::params::repo_version, String $package_ensure = $::fluentd::params::package_ensure, String $package_name = $::fluentd::params::package_name, Array $package_install_options = $::fluentd::params::package_install_options, diff --git a/manifests/params.pp b/manifests/params.pp index cd01efe..33ac0b2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -18,6 +18,8 @@ class fluentd::params { $user_name = 'td-agent' $user_group = 'td-agent' $user_groups = ['adm'] + # repo params + $repo_version = 3 case $::osfamily { 'Debian': { diff --git a/manifests/repo/apt.pp b/manifests/repo/apt.pp index a7049ee..dd9b194 100644 --- a/manifests/repo/apt.pp +++ b/manifests/repo/apt.pp @@ -2,7 +2,7 @@ # class fluentd::repo::apt ( $ensure = 'present', - $location = downcase("http://packages.treasuredata.com/2/${::lsbdistid}/${::lsbdistcodename}"), + $location = downcase("http://packages.treasuredata.com/${::fluentd::repo_version}/${::lsbdistid}/${::lsbdistcodename}"), $release = $::lsbdistcodename, $repos = 'contrib', $architecture = $::architecture, diff --git a/manifests/repo/yum.pp b/manifests/repo/yum.pp index fea6b9a..c8ebc79 100644 --- a/manifests/repo/yum.pp +++ b/manifests/repo/yum.pp @@ -3,7 +3,7 @@ class fluentd::repo::yum ( $ensure = 'present', $descr = 'TreasureData', - $baseurl = 'https://packages.treasuredata.com/2/redhat/$releasever/$basearch', + $baseurl = "https://packages.treasuredata.com/${::fluentd::repo_version}/redhat/\$releasever/\$basearch", $enabled = '1', $gpgcheck = '1', $gpgkey = 'https://packages.treasuredata.com/GPG-KEY-td-agent',