Skip to content

Commit 931eaba

Browse files
Fixes
1 parent 2be2795 commit 931eaba

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

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

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,25 @@ instances:
3333
<%- if instance['tls_ignore_warning'] && instance['tls_ignore_warning'] != :undef -%>
3434
tls_ignore_warning: <%= instance['tls_ignore_warning'] %>
3535
<%- end -%>
36-
<%- tags = instance['tags'].is_a?(Array) ? instance['tags'] : [] -%>
37-
<%- unless tags.empty? -%>
36+
<% tags = Array(instance['tags']) %>
37+
<% unless tags.empty? %>
3838
tags:
39-
<%- tags.each do |tag| -%>
39+
<% tags.each do |tag| %>
4040
- <%= tag %>
41-
<%- end -%>
42-
<%- end -%>
43-
<%- protocols = instance['tls_protocols_allowed'].is_a?(Array) ? instance['tls_protocols_allowed'] : [] -%>
44-
<%- unless protocols.empty? -%>
41+
<% end %>
42+
<% end %>
43+
<% protocols = Array(instance['tls_protocols_allowed']) %>
44+
<% unless protocols.empty? %>
4545
tls_protocols_allowed:
46-
<%- protocols.each do |protocol| -%>
46+
<% protocols.each do |protocol| %>
4747
- <%= protocol %>
48-
<%- end -%>
49-
<%- end -%>
50-
<%- ciphers = instance['tls_ciphers'].is_a?(Array) ? instance['tls_ciphers'] : [] -%>
51-
<%- unless ciphers.empty? -%>
48+
<% end %>
49+
<% end %>
50+
<% ciphers = Array(instance['tls_ciphers']) %>
51+
<% unless ciphers.empty? %>
5252
tls_ciphers:
53-
<%- ciphers.each do |cipher| -%>
53+
<% ciphers.each do |cipher| %>
5454
- <%= cipher %>
55-
<%- end -%>
56-
<%- end -%>
55+
<% end %>
56+
<% end %>
57+
<% end %>

templates/agent-conf.d/test.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)