From a6703e9e5700bc4f710e6a465f4bc28b769f4ad8 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 13 Feb 2019 09:06:58 -0800 Subject: [PATCH] Prep for pbx upgrade to xenial This sets our testing to test pbx manifest on xenial and adds a hiera group called pbx to the servers so we can properly do servernames with digits and have common config in hiera. Change-Id: I8c3096d18fe318c6ca206203de0ac984c8934566 --- manifests/site.pp | 2 ++ modules/openstack_project/templates/pbx/asterisk/sip.conf.erb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 1b1c10a047..395417ddbc 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1068,7 +1068,9 @@ node /^zm\d+.open.*\.org$/ { } # Node-OS: trusty +# Node-OS: xenial node /^pbx\d*\.open.*\.org$/ { + $group = "pbx" class { 'openstack_project::server': } class { 'openstack_project::pbx': sip_providers => [ diff --git a/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb b/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb index 9a544a6acc..e212129fcc 100644 --- a/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb +++ b/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb @@ -12,12 +12,12 @@ allow=ulaw allow=alaw allow=gsm nat=force_rport,comedia -<% sip_providers.each do |provider| -%> +<% @sip_providers.each do |provider| -%> register => <%= provider['username'] %>:<%= provider['password'] %>@<%= provider['hostname'] %>:5060 <% end -%> -<% sip_providers.each do |provider| -%> +<% @sip_providers.each do |provider| -%> <% if provider['outgoing'] == true -%> [<%= provider['username'] %>] context=public