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

Puppet inserting --- before outputs in yml #1

Open
moretalk opened this issue Sep 20, 2016 · 4 comments · May be fixed by #29
Open

Puppet inserting --- before outputs in yml #1

moretalk opened this issue Sep 20, 2016 · 4 comments · May be fixed by #29

Comments

@moretalk
Copy link

moretalk commented Sep 20, 2016

Hi,

Iv found puppet keeps inserting --- above the outputs section in our yml file which is making winlogbeat ignore the outputs section. Example below:

https://gist.github.com/moretalk/498f5f400e31fa13661c6419768cc6c3

@claflico
Copy link
Contributor

Are you getting anything before the initial winlogbeat:? I'd like to know which template file is getting used.

What version of puppet are you using?

@moretalk
Copy link
Author

Hi Sorry should of said it's the new template > ruby 18. I tried forcing the old template and although --- was not there it still had some weird indentation that stopped it working. Puppet server 3.8.7

@tschettino
Copy link

tschettino commented May 10, 2017

Had this problem with winlogbeat.yml.erb template
change the template last lines like (check the indentation)
### Winlogbeat configuration managed by Puppet ###
<%= @winlogbeat_config.to_yaml %>
winlogbeat:
registry_file: <%= @registry_file %>
<%- if @event_logs != nil -%>
event_logs:
<%- @event_logs.each do |event_log,options| -%>
- name: <%= event_log %>
ignore_older: <%= options["ignore_older"] %>
<%- end -%>
<%- end -%>

@disaster37 disaster37 linked a pull request May 17, 2019 that will close this issue
@ghoneycutt
Copy link
Member

Might look at refactoring to use to_yaml() instead of building the yaml in template files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants