-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logstash: config,patternfile respect $::logstash::ensure
#411
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,6 +2,10 @@ | |||||
# | ||||||
# Parameters are mutually exclusive. Only one should be specified. | ||||||
# | ||||||
# @param [String] ensure | ||||||
# Ensure the file is either [`present`,`absent`]. | ||||||
# Useful if you want to place the file on some servers but specifically not on (or remove from) other servers | ||||||
# | ||||||
# @param [String] content | ||||||
# Literal content to be placed in the file. | ||||||
# | ||||||
|
@@ -42,6 +46,7 @@ | |||||
# @author https://github.com/elastic/puppet-logstash/graphs/contributors | ||||||
# | ||||||
define logstash::configfile ( | ||||||
Enum['present', 'absent'] $ensure = $logstash::ensure, | ||||||
$content = undef, | ||||||
$source = undef, | ||||||
$template = undef, | ||||||
|
@@ -64,6 +69,7 @@ | |||||
|
||||||
if($config) { | ||||||
file { $config_file: | ||||||
ensure => $ensure, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if there's a |
||||||
content => $config, | ||||||
owner => $owner, | ||||||
group => $group, | ||||||
|
@@ -74,6 +80,7 @@ | |||||
} | ||||||
elsif($source) { | ||||||
file { $config_file: | ||||||
ensure => $ensure, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
source => $source, | ||||||
owner => $owner, | ||||||
group => $group, | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,6 +20,7 @@ | |||||
# @author https://github.com/elastic/puppet-logstash/graphs/contributors | ||||||
# | ||||||
define logstash::patternfile ( | ||||||
$ensure = $::logstash::ensure, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, either we need to document this… |
||||||
Pattern[/^(puppet|file):\/\//] $source = undef, | ||||||
Optional[String[1]] $filename = undef, | ||||||
) { | ||||||
|
@@ -28,7 +29,7 @@ | |||||
$destination = pick($filename, basename($source)) | ||||||
|
||||||
file { "${logstash::config_dir}/patterns/${destination}": | ||||||
ensure => file, | ||||||
ensure => $ensure, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. …otherwise:
Suggested change
|
||||||
source => $source, | ||||||
owner => 'root', | ||||||
group => $logstash::logstash_group, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't list the datatype, that's a legacy notation and not required anymore. puppet-strings will parse it out of the code now.