From 5c8ccdc05200b1df84cd8af8ff487f292c29ddcd Mon Sep 17 00:00:00 2001 From: John Noss Date: Mon, 2 May 2016 12:59:31 -0400 Subject: [PATCH] add onegate_endpoint parameter This allows for setting the full onegate endpoint in oned.conf (needed if using https proxy, etc). If specified this param will override the onegate_ip param. Note this param does not change onegate conf, just the value of ONEGATE_ENDPOINT in oned.conf --- manifests/init.pp | 1 + manifests/params.pp | 2 ++ templates/oned.conf.erb | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 32084963..0da2d555 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -401,6 +401,7 @@ $hook_scripts = $one::params::hook_scripts, $inherit_datastore_attrs = $one::params::inherit_datastore_attrs, $oned_onegate_ip = $one::params::oned_onegate_ip, + $oned_onegate_endpoint = $one::params::oned_onegate_endpoint, $kickstart_network = $one::params::kickstart_network, $kickstart_partition = $one::params::kickstart_partition, $kickstart_rootpw = $one::params::kickstart_rootpw, diff --git a/manifests/params.pp b/manifests/params.pp index a20605c5..18282392 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -122,6 +122,8 @@ # Todo: Use Serviceip from HA-Setup if ha enabled. $oned_onegate_ip = hiera('one::oned::onegate::ip', $::ipaddress) + # Specify full endpoint if needed (such as if using https proxy) + $oned_onegate_endpoint = hiera('one::oned::onegate::endpoint', undef) # E-POST imaginator parameters $kickstart_network = hiera ('one::node::kickstart::network', undef) diff --git a/templates/oned.conf.erb b/templates/oned.conf.erb index 69f87c8e..098c605b 100644 --- a/templates/oned.conf.erb +++ b/templates/oned.conf.erb @@ -899,8 +899,10 @@ DEFAULT_UMASK = 177 # MUST be consistent with the values in onegate-server.conf #******************************************************************************* -<% if scope.lookupvar('one::oned_onegate_ip') -%> -ONEGATE_ENDPOINT = "<%= scope.lookupvar('one::oned_onegate_ip') %>:5030" +<% if scope.lookupvar('one::oned_onegate_endpoint') -%> +ONEGATE_ENDPOINT = "<%= scope.lookupvar('one::oned_onegate_endpoint') %>" +<% elsif scope.lookupvar('one::oned_onegate_ip') -%> +ONEGATE_ENDPOINT = "http://<%= scope.lookupvar('one::oned_onegate_ip') %>:5030" <% else -%> #ONEGATE_ENDPOINT = "http://frontend:5030" <% end -%>