Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: git::install: make $lock_file truly optional
......................................................................


git::install: make $lock_file truly optional

Without this, if you don't define a lock file you get a puppet error:
creates must be a fully qualified path

so we add the parameter only if $lock_file is defined.

Change-Id: I0f0005e1a21eb43c2f35c68a9265ed8a3d504354
---
M modules/git/manifests/install.pp
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/git/manifests/install.pp b/modules/git/manifests/install.pp
index 2b0d1e5..7b6aad6 100644
--- a/modules/git/manifests/install.pp
+++ b/modules/git/manifests/install.pp
@@ -76,9 +76,9 @@
             }
         }
 
+
         exec {"git_update_${title}":
             command => '/usr/bin/git remote update && git fetch --tags',
-            creates => $lock_file,
             cwd     => $directory,
             user    => $owner,
             unless  => "git clean -df & git checkout . && git diff 
HEAD..${git_tag} --exit-code",
@@ -87,6 +87,12 @@
             notify  => Exec["git_checkout_${title}"],
         }
 
+        if $lock_file {
+            Exec["git_update_${title}"] {
+                creates => $lock_file,
+            }
+        }
+
         exec {"git_checkout_${title}":
             command     => "git checkout tags/${git_tag}",
             cwd         => $directory,

-- 
To view, visit https://gerrit.wikimedia.org/r/231515
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f0005e1a21eb43c2f35c68a9265ed8a3d504354
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to