diff --git a/modules/services/unix/http/parameterised_website/manifests/install.pp b/modules/services/unix/http/parameterised_website/manifests/install.pp index 3f51e3cde..b1583f7b5 100644 --- a/modules/services/unix/http/parameterised_website/manifests/install.pp +++ b/modules/services/unix/http/parameterised_website/manifests/install.pp @@ -5,7 +5,8 @@ class parameterised_website::install { # Parse out parameters $business_name = $secgen_parameters['business_name'][0] $business_motto = $secgen_parameters['business_motto'][0] - $manager_profile = parsejson($secgen_parameters['manager_profile'][0]) + $manager_profile = $secgen_parameters['manager_profile'][0] + if $manager_profile != '' { $manager_profile = parsejson($manager_profile) } $business_address = $secgen_parameters['business_address'][0] $office_telephone = $secgen_parameters['office_telephone'][0] $office_email = $secgen_parameters['office_email'][0] @@ -54,10 +55,12 @@ class parameterised_website::install { content => template($index_template), } - # Apply contact page template - file { "$docroot/contact.html": - ensure => file, - content => template('parameterised_website/contact.html.erb'), + if $manager_profile != '' or $business_address != '' or $employees[0] != '' { + # Apply contact page template + file { "$docroot/contact.html": + ensure => file, + content => template('parameterised_website/contact.html.erb'), + } } # Create visible tab html files diff --git a/modules/services/unix/http/parameterised_website/templates/subtemplates/main_container.html.erb b/modules/services/unix/http/parameterised_website/templates/subtemplates/main_container.html.erb index 4231ba544..59636069b 100644 --- a/modules/services/unix/http/parameterised_website/templates/subtemplates/main_container.html.erb +++ b/modules/services/unix/http/parameterised_website/templates/subtemplates/main_container.html.erb @@ -11,7 +11,7 @@
Find the Acceptable Use Policy here.
<% end -%> <% # Externally input / default style -%> - <% else -%> + <% elsif @manager_profile != '' or @employees[0] != '' or @business_address != ''-%><%= @main_page_paragraph_content.join %>
diff --git a/modules/services/unix/http/parameterised_website/templates/subtemplates/navbar.html.erb b/modules/services/unix/http/parameterised_website/templates/subtemplates/navbar.html.erb index f0a430840..7a1b78e8e 100644 --- a/modules/services/unix/http/parameterised_website/templates/subtemplates/navbar.html.erb +++ b/modules/services/unix/http/parameterised_website/templates/subtemplates/navbar.html.erb @@ -3,7 +3,9 @@