Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit a7661a8

Browse files
committed
Merge pull request #55 from pixelpark/exec_refreshonly
trigger exec only when we have an other version
2 parents e89609a + a767e46 commit a7661a8

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

manifests/init.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@
173173
}
174174
->
175175
exec { 'remove-old-versions-of-sonarqube':
176-
command => "/tmp/cleanup-old-sonarqube-versions.sh ${installroot} ${version}",
177-
path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin',
176+
command => "/tmp/cleanup-old-sonarqube-versions.sh ${installroot} ${version}",
177+
path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin',
178+
refreshonly => true,
179+
subscribe => File["${installroot}/${package_name}-${version}"],
178180
}
179181

180182
# The plugins directory. Useful to later reference it from the plugin definition

manifests/plugin.pp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
before => File[$plugin],
3737
require => File[$sonarqube::plugin_dir],
3838
}
39-
->
39+
~>
4040
exec { "remove-old-versions-of-${artifactid}":
41-
command => "/tmp/cleanup-old-plugin-versions.sh ${sonarqube::plugin_dir} ${artifactid} ${version}",
42-
path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin',
41+
command => "/tmp/cleanup-old-plugin-versions.sh ${sonarqube::plugin_dir} ${artifactid} ${version}",
42+
path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin',
43+
refreshonly => true,
4344
}
4445
->
4546
file { $plugin:

0 commit comments

Comments
 (0)