Skip to content

Commit 5a38c82

Browse files
fwelschentruthbk
authored andcommitted
Remove identation of the pgbouncer template to match the needed format of configuration file (#427)
With the current template the output of the configuration if the tags field was set was wrongly indented: Output Example: ``` init_config: instances: - host: localhost port: 5678 username: datadog password: some-interesting-password tags: - dbinstanceidentifier:some-instance-identifier ``` The agent in this scenario was working right but if the integration with pgbouncer was not working as the tag field was wrongly indented. With this change, the format will be the following ``` init_config: instances: - host: localhost port: 5678 username: datadog password: some-interesting-password tags: - dbinstanceidentifier:some-instance-identifier ``` Making the integration work if tags are specified.
1 parent 98fe169 commit 5a38c82

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

templates/agent-conf.d/pgbouncer.yaml.erb

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ instances:
1010
port: <%= @port %>
1111
username: <%= @username %>
1212
password: <%= @password %>
13-
<% if @tags and ! @tags.empty? -%>
13+
<% if @tags and ! @tags.empty? -%>
1414
tags:
15-
<%- Array(@tags).each do |tag| -%>
16-
<%- if tag != '' -%>
15+
<%- Array(@tags).each do |tag| -%>
16+
<%- if tag != '' -%>
1717
- <%= tag %>
18-
<%- end -%>
1918
<%- end -%>
20-
<% end -%>
19+
<%- end -%>
20+
<% end -%>
2121
<%- else -%>
2222
<%= {'init_config'=>nil, 'instances'=>@pgbouncers}.to_yaml %>
2323
<%- end -%>

0 commit comments

Comments
 (0)