Skip to content

Commit

Permalink
add variable for config_file_mode und config_folder_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHoenscheid authored and Simon Hönscheid committed Nov 21, 2018
1 parent d88423e commit 8dcea81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
content => template('telegraf/telegraf.conf.erb'),
owner => $::telegraf::config_file_owner,
group => $::telegraf::config_file_group,
mode => '0640',
mode => $::telegraf::config_file_mode,
notify => Class['::telegraf::service'],
require => Class['::telegraf::install'],
;
$::telegraf::config_folder:
ensure => directory,
owner => $::telegraf::config_file_owner,
group => $::telegraf::config_file_group,
mode => '0770',
mode => $::telegraf::config_folder_mode,
purge => $::telegraf::purge_config_fragments,
recurse => true,
notify => Class['::telegraf::service'],
Expand Down
10 changes: 9 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
# [*config_file_group*]
# String. Group to own the telegraf config file.
#
# [*config_file_mode*]
# String. File mode for the telegraf config file.
#
# [*config_folder*]
# String. Path of additional telegraf config files.
# String. Path of additional telegraf config folder.
#
# [*config_folder_mode*]
# String. File mode for the telegraf config folder.
#
# [*hostname*]
# String. Override default hostname used to identify this agent.
Expand Down Expand Up @@ -95,7 +101,9 @@
String $config_file = $telegraf::params::config_file,
String $config_file_owner = $telegraf::params::config_file_owner,
String $config_file_group = $telegraf::params::config_file_group,
String $config_file_mode = $telegraf::params::config_file_mode,
String $config_folder = $telegraf::params::config_folder,
String $config_folder_mode = $telegraf::params::config_folder_mode,
String $hostname = $telegraf::params::hostname,
Boolean $omit_hostname = $telegraf::params::omit_hostname,
String $interval = $telegraf::params::interval,
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
$config_file = '/etc/telegraf/telegraf.conf'
$config_file_owner = 'telegraf'
$config_file_group = 'telegraf'
$config_file_mode = '0640'
$config_folder = '/etc/telegraf/telegraf.d'
$config_folder_mode = '0770'
$logfile = ''
$manage_repo = true
$repo_location = 'https://repos.influxdata.com/'
Expand Down

0 comments on commit 8dcea81

Please sign in to comment.