From 43e1ca47c1e6b1b2931e42b1f6e0039f4b37bbaa Mon Sep 17 00:00:00 2001 From: Nate Warren Date: Fri, 2 May 2014 09:37:03 -0500 Subject: [PATCH] support upgraded versions to bundled plugins --- manifests/plugin.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/plugin.pp b/manifests/plugin.pp index fd0dd8683..cd3e4a69d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -69,6 +69,17 @@ } } + # create a pinned file if the plugin has a .jpi extension + # to override the builtin module versions + exec { "create-pinnedfile-${name}" : + command => "touch ${plugin_dir}/${name}.jpi.pinned", + cwd => $plugin_dir, + require => File[$plugin_dir], + path => ['/usr/bin', '/usr/sbin', '/bin'], + onlyif => "test -f ${plugin_dir}/${name}.jpi -a ! -f ${plugin_dir}/${name}.jpi.pinned", + before => Exec["download-${name}"], + } + exec { "download-${name}" : command => "rm -rf ${name} ${name}.* && wget --no-check-certificate ${base_url}${plugin}", cwd => $plugin_dir,