Skip to content

Commit

Permalink
Extend the version check to the tailored jira servicedesk version
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kluge committed Jun 15, 2021
1 parent 028d796 commit 514f1c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@

# Jira Settings
String $version = '8.13.5',
String $product = 'jira',
Enum['jira', 'servicedesk'] $product = 'jira',
Stdlib::Absolutepath $installdir = '/opt/jira',
Stdlib::Absolutepath $homedir = '/home/jira',
Boolean $manage_user = true,
Expand Down Expand Up @@ -354,7 +354,7 @@
# Command to stop jira in preparation to upgrade. This is configurable
# incase the jira service is managed outside of puppet. eg: using the
# puppetlabs-corosync module: 'crm resource stop jira && sleep 15'
# Note: the command should return either 0 or 5
# Note: the command should return either 0 or 5
# when the service doesn't exist
String $stop_jira = 'systemctl stop jira.service && sleep 15',
# Whether to manage the 'check-java.sh' script, and where to retrieve
Expand Down Expand Up @@ -412,9 +412,12 @@
Optional[Integer[0]] $poolsize = undef,
Optional[Boolean] $enable_connection_pooling = undef,
) {
if versioncmp($jira::version, '8.0.0') < 0 {
if $product == 'jira' and versioncmp($jira::version, '8.0.0') < 0 {
fail('JIRA versions older than 8.0.0 are no longer supported. Please use an older version of this module to upgrade first.')
}
if $product == 'servicedesk' and versioncmp($jira::version, '4.10.0') < 0 {
fail('JIRA servicedesk versions older than 4.10.0 are no longer supported. Please use an older version of this module to upgrade first.')
}

if $datacenter and !$shared_homedir {
fail("\$shared_homedir must be set when \$datacenter is true")
Expand Down

0 comments on commit 514f1c3

Please sign in to comment.