Skip to content
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

Fix appending puppet config entry #762

Closed

Conversation

dnlsng
Copy link

@dnlsng dnlsng commented Sep 10, 2020

This fixes issue #759 by reverting e87d8f2 and then adding a newline to the end of the puppet.conf file.

@@ -73,6 +73,17 @@
puppet::config::main { $key: value => $value }
}

# Ensure there is a newline at the end of puppet.conf
$newline = $facts['os']['family'] ? {
'Windows' => "\r\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit odd since the other parts only use \n and not \r\n.

@@ -30,7 +30,7 @@
# they make sure that '1_main ' is ordered before '1_main_*'
ensure_resource('concat::fragment', "puppet.conf_${section}", {
target => "${puppet::dir}/puppet.conf",
content => "\n[${section}]",
content => "\n\n[${section}]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only downside of this is that you end up with 2 empty lines at the start of the file. I'm not sure how to best deal with that.

@ekohl
Copy link
Member

ekohl commented Mar 29, 2021

#782 was merged and resolves the issue.

@ekohl ekohl closed this Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Appending values with puppet::config::entry is broken
3 participants