local glob
This commit is contained in:
parent
99f1eb51a5
commit
19b998444d
2 changed files with 6 additions and 1 deletions
|
@ -11,7 +11,7 @@ class eid::telegraf(String $version = "stable") {
|
|||
notify => Sunet::Docker_run['telegraf']
|
||||
}
|
||||
|
||||
Dir(["/etc/telegraf/telegraf.conf.d/*.conf"]).each |Integer $index, String $file| {
|
||||
eid_glob(["/etc/telegraf/telegraf.conf.d/*.conf"]).each |Integer $index, String $file| {
|
||||
concat::fragment { $file:
|
||||
target => "/etc/telegraf/telegraf.conf",
|
||||
source => $file,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
module Puppet::Parser::Functions
|
||||
newfunction(:eid_glob, :type => :rvalue) do |args|
|
||||
return Dir.glob(args[0]);
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue