Skip to content

Commit a40b36f

Browse files
authored
Merge pull request #250 from bmagistro/jira-bitbucket-pkg-conflict
switch to using ensure_packages to avoid conflicts
2 parents e4462f5 + 728fa18 commit a40b36f

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

manifests/facts.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@
4949
}
5050

5151
if $facts['osfamily'] == 'RedHat' and $facts['puppetversion'] !~ /Puppet Enterprise/ {
52-
package { $json_packages:
53-
ensure => present,
54-
}
52+
ensure_packages ($json_packages, { ensure => present })
5553
}
5654

5755
file { "/etc/${dir}facter/facts.d/jira_facts.rb":

manifests/params.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
case $facts['osfamily'] {
1010
/RedHat/: {
1111
if versioncmp($facts['operatingsystemmajrelease'], '7') >= 0 {
12-
$json_packages = 'rubygem-json'
12+
$json_packages = [ 'rubygem-json' ]
1313
$service_file_location = '/usr/lib/systemd/system/jira.service'
1414
$service_file_template = 'jira/jira.service.erb'
1515
$service_lockfile = '/var/lock/subsys/jira'
@@ -29,7 +29,7 @@
2929
case $::operatingsystem {
3030
'Ubuntu': {
3131
if versioncmp($facts['operatingsystemmajrelease'], '15.04') >= 0 {
32-
$json_packages = 'ruby-json'
32+
$json_packages = [ 'ruby-json' ]
3333
$service_file_location = '/lib/systemd/system/jira.service'
3434
$service_file_template = 'jira/jira.service.erb'
3535
$service_lockfile = '/var/lock/subsys/jira'
@@ -44,7 +44,7 @@
4444
}
4545
default: {
4646
if versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 {
47-
$json_packages = 'ruby-json'
47+
$json_packages = [ 'ruby-json' ]
4848
$service_file_location = '/lib/systemd/system/jira.service'
4949
$service_file_template = 'jira/jira.service.erb'
5050
$service_lockfile = '/var/lock/subsys/jira'

0 commit comments

Comments
 (0)