forked from DataDog/chef-datadog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.yaml.erb
35 lines (33 loc) · 968 Bytes
/
nginx.yaml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%= JSON.parse(({'logs' => @logs }).to_json).to_yaml %>
instances:
<% @instances.each do |i| -%>
- nginx_status_url: <%= i['nginx_status_url'] %>
<% unless i['ssl_validation'].nil? -%>
ssl_validation: <%= i['ssl_validation'] %>
<% end -%>
<% unless i['skip_proxy'].nil? -%>
skip_proxy: <%= i['skip_proxy'] %>
<% end -%>
<% unless i['use_plus_api'].nil? -%>
use_plus_api: <%= i['use_plus_api'] %>
<% end -%>
<% unless i['plus_api_version'].nil? -%>
plus_api_version: <%= i['plus_api_version'] %>
<% end -%>
<% unless i['use_vts'].nil? -%>
use_vts: <%= i['use_vts'] %>
<% end -%>
<%# don't print user/password if either is nil -%>
<% unless i['user'].nil? || i['password'].nil? -%>
user: <%= i['user'] %>
password: <%= i['password'] %>
<% end -%>
<% if i.key?('tags') -%>
tags:
<% i['tags'].each do |t| -%>
- <%= t %>
<% end -%>
<% end -%>
<% end -%>
# Nothing to configure here
init_config: