Skip to content

Commit

Permalink
[proxy] dont be chatty (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
truthbk authored Dec 27, 2018
1 parent 8a29860 commit effeef1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
15 changes: 5 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@
$statsd_forward_host = '',
$statsd_forward_port = '',
$statsd_histogram_percentiles = '0.95',
$proxy_host = '',
$proxy_port = '',
$proxy_user = '',
$proxy_password = '',
Optional[String] $proxy_host = undef,
Optional[Variant[Integer, Pattern[/^\d*$/]]] $proxy_port = undef,
Optional[String] $proxy_user = undef,
Optional[String] $proxy_password = undef,
$graphite_listen_port = '',
$extra_template = '',
$ganglia_host = '',
Expand Down Expand Up @@ -317,7 +317,6 @@
# lint:ignore:only_variable_string
$_dogstatsd_port = "${dogstatsd_port}"
$_statsd_forward_port = "${statsd_forward_port}"
$_proxy_port = "${proxy_port}"
$_graphite_listen_port = "${graphite_listen_port}"
$_listen_port = "${listen_port}"
$_pup_port = "${pup_port}"
Expand All @@ -342,10 +341,6 @@
validate_legacy(String, 'validate_re', $_dogstatsd_port, '^\d*$')
validate_legacy(String, 'validate_string', $statsd_histogram_percentiles)
validate_legacy(String, 'validate_re', $_statsd_forward_port, '^\d*$')
validate_legacy(String, 'validate_string', $proxy_host)
validate_legacy(String, 'validate_re', $_proxy_port, '^\d*$')
validate_legacy(String, 'validate_string', $proxy_user)
validate_legacy(String, 'validate_string', $proxy_password)
validate_legacy(String, 'validate_re', $_graphite_listen_port, '^\d*$')
validate_legacy(String, 'validate_string', $extra_template)
validate_legacy(String, 'validate_string', $ganglia_host)
Expand Down Expand Up @@ -578,7 +573,7 @@
if !empty($proxy_host) {
notify { 'Setting proxy_host will have no effect on agent6 please use agent6_extra_options to set your proxy': }
}
if !empty($_proxy_port) {
if !empty($proxy_port) {
notify { 'Setting proxy_port will have no effect on agent6 please use agent6_extra_options to set your proxy': }
}
if !empty($proxy_user) {
Expand Down
10 changes: 5 additions & 5 deletions templates/datadog_header.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
dd_url: <%= @_dd_url %>

# If you need a proxy to connect to the Internet, provide the settings here
<% if @proxy_host.empty? -%>
<% if !defined?(@proxy_host) || @proxy_host.empty? -%>
# proxy_host:
<% else -%>
proxy_host: <%= @proxy_host %>
<% end -%>
<% if @_proxy_port.empty? -%>
<% if !defined?(@proxy_port) || "#{@proxy_port}".empty? -%>
# proxy_port:
<% else -%>
proxy_port: <%= @_proxy_port %>
proxy_port: <%= @proxy_port %>
<% end -%>
<% if @proxy_user.empty? -%>
<% if !defined?(@proxy_user) || @proxy_user.empty? -%>
# proxy_user:
<% else -%>
proxy_user: <%= @proxy_user %>
<% end -%>
<% if @proxy_password.empty? -%>
<% if !defined?(@proxy_password) || @proxy_password.empty? -%>
# proxy_password:
<% else -%>
proxy_password: <%= @proxy_password %>
Expand Down

0 comments on commit effeef1

Please sign in to comment.