-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47695c9
commit 4e2ec53
Showing
7 changed files
with
61 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# Enable a modules.d file either via a custom source, custom template or default module template | ||
# $config can be used to pass down parameters into an .erb template | ||
define metricbeat::modulesd( | ||
define metricbeat::modulesd ( | ||
String $template_name = $name, | ||
Hash $config = {}, | ||
Optional[String] $source = undef, | ||
Optional[String] $content = undef, | ||
){ | ||
) { | ||
# Use the default template as the source if non specified | ||
if ! $source and ! $content { | ||
$default_source = "puppet:///modules/metricbeat/${template_name}.yml" | ||
} elsif $source { | ||
$default_source = $source | ||
} | ||
file { "${metricbeat::config_dir}/modules.d/${template_name}.yml": | ||
ensure => present, | ||
ensure => file, | ||
source => $default_source, | ||
content => $content, | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
require => Class['::metricbeat'], | ||
notify => Class['::metricbeat::service'], | ||
require => Class['metricbeat'], | ||
notify => Class['metricbeat::service'], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters