Skip to content

Commit

Permalink
enable setting of bind_host and bind_port for feature::api
Browse files Browse the repository at this point in the history
  • Loading branch information
aschaber1 committed Mar 1, 2017
1 parent 44180f7 commit 1369a22
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions manifests/feature/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
# [*ssl_cipher_list*]
# List of allowed TLS ciphers, to finetune encryption. Default undef (e.g. "HIGH:MEDIUM:!aNULL:!MD5:!RC4")
#
# [*bind_host*]
# The IP address the api listener will be bound to. Defaults to 0.0.0.0.
#
# [*bind_port*]
# The port the api listener will be bound to. Defaults to 5665.
#
# === Variables
#
# [*node_name*]
Expand Down Expand Up @@ -152,6 +158,8 @@
$ssl_cacert = undef,
$ssl_protocolmin = undef,
$ssl_cipher_list = undef,
$bind_host = undef,
$bind_port = undef,
) {

$conf_dir = $::icinga2::params::conf_dir
Expand Down Expand Up @@ -210,6 +218,14 @@
if $ssl_cipher_list {
validate_string($ssl_cipher_list)
}
if $bind_host {
validate_string($bind_host)
}
if $bind_port {
validate_integer($bind_port)
}



# handle the certificate's stuff
case $pki {
Expand Down Expand Up @@ -326,6 +342,8 @@
ticket_salt => $ticket_salt,
tls_protocolmin => $ssl_protocolmin,
cipher_list => $ssl_cipher_list,
bind_host => $bind_host,
bind_port => $bind_port,
}

# create endpoints and zones
Expand Down

0 comments on commit 1369a22

Please sign in to comment.