-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
See https://github.com/stdmod/puppet-elasticsearch/blob/master/manifests/init.pp#L93:
if $file_content {
$managed_file_content = $file_content
} else {
if $file_template {
$managed_file_content = template($file_template)
} else {
$managed_file_content = undef
}
}
Using this pattern would lead to an explicit error:
if $bind::config_path {
file { 'named.conf':
ensure => $bind::config_ensure,
path => $bind::config_path,
mode => $bind::config_mode,
owner => $bind::config_owner,
group => $bind::config_group,
source => $bind::config_source,
}
if $config_content {
File['named.conf'] {
content => $config_content }
}
if $config_template {
File['named.conf'] {
content => template($config_template) }
}
}
The original would already error out if both source and content were specified.
Metadata
Metadata
Assignees
Labels
No labels