diff --git a/README.md b/README.md index 7d247393..62c2a281 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,10 @@ If the jira service is managed outside of puppet the stop_jira paramater can be Defaults to {}, See examples on how to use. +#####`$contextpath = ""` + +Defaults to an empty string (""). Will add a path to the Tomcat Server Context. + ####Tomcat parameters#### #####`$tomcatPort` @@ -363,6 +367,7 @@ jira::proxy: scheme: 'https' proxyName: 'jira.example.co.za' proxyPort: '443' +jira::contextpath: '/jira' ``` Reverse proxy can be configured as a hash as part of the JIRA resource diff --git a/jira.yaml b/jira.yaml index 0a3ddf21..82746c01 100644 --- a/jira.yaml +++ b/jira.yaml @@ -100,3 +100,5 @@ jira::proxy: scheme: 'https' proxyName: 'www.exmaple.co.za' proxyPort: '443' +# Configure path attribute for the +jira::contextpath: '/jira' diff --git a/manifests/init.pp b/manifests/init.pp index 298dfb17..f1562d54 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -104,12 +104,15 @@ # Reverse https proxy $proxy = {}, + # Context path (usualy used in combination with a reverse proxy) + $contextpath = '', ) inherits jira::params { - if $jira::db != 'postgresql' and $jira::db != 'mysql' { - fail('jira db parameter must be postgresql or mysql') - } + # Parameter validations + validate_re($db, ['^postgresql','^mysql'], 'The JIRA $db parameter must be "postgresql" or "mysql".') + validate_hash($proxy) + validate_re($contextpath, ['^$', '^/.*']) if $::jira_version { # If the running version of JIRA is less than the expected version of JIRA diff --git a/templates/server.xml.erb b/templates/server.xml.erb index def0b4ca..d6e2511f 100644 --- a/templates/server.xml.erb +++ b/templates/server.xml.erb @@ -119,7 +119,7 @@ - +