voxpupuli / puppet-winlogbeat

Apache License 2.0
2 stars 30 forks source link

Puppet inserting --- before outputs in yml #1

Open moretalk opened 8 years ago

moretalk commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 7 years ago

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 -%>

ghoneycutt commented 3 years ago

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