Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75525


Change subject: Don't run our post-merge magic every time
......................................................................

Don't run our post-merge magic every time

Only run it if this is the real, user-approved merge
run as 'gitpuppet'.

Change-Id: I4283663c5089f42967131472fd9bbd7602773a69
---
M files/puppet/git/puppet/post-merge
M templates/puppet/puppet.conf.d/10-main.conf.erb
2 files changed, 13 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/75525/1

diff --git a/files/puppet/git/puppet/post-merge 
b/files/puppet/git/puppet/post-merge
index 6523b33..40a8915 100644
--- a/files/puppet/git/puppet/post-merge
+++ b/files/puppet/git/puppet/post-merge
@@ -3,16 +3,18 @@
 PATH=/usr/bin:/bin
 export PATH
 
-# Add an apache reload, since puppet is stupid and will botch
-# catalogues in a way that does not show up on the clients and causes
-# an insane amount of confusion. A reload makes it regenerate them properly.
-#/etc/init.d/apache2 reload
+if [ "$USER" = "gitpuppet" ]; then
+    # Add an apache reload, since puppet is stupid and will botch
+    # catalogues in a way that does not show up on the clients and causes
+    # an insane amount of confusion. A reload makes it regenerate them 
properly.
+    #/etc/init.d/apache2 reload
 
-# This bug has allegedly been fixed, so let's try with touch site.pp again
-touch /etc/puppet/manifests/site.pp
+    # This bug has allegedly been fixed, so let's try with touch site.pp again
+    touch /etc/puppet/manifests/site.pp
 
-if [ `hostname` = 'sockpuppet' ]; then
-    # If no key is forwarded then this will use the ready-made equivalent 
command
-    #  on stafford and ignore our command.
-    ssh -t -t stafford.pmtpa.wmnet 'cd /var/lib/git/operations/puppet && git 
pull && git submodule update --init'
+    if [ `hostname` = 'sockpuppet' ]; then
+        # If no key is forwarded then this will use the ready-made equivalent 
command
+        #  on stafford and ignore our command.
+        ssh -t -t stafford.pmtpa.wmnet 'cd /var/lib/git/operations/puppet && 
git pull && git submodule update --init'
+    fi
 fi
diff --git a/templates/puppet/puppet.conf.d/10-main.conf.erb 
b/templates/puppet/puppet.conf.d/10-main.conf.erb
index 7ee043e..5adf698 100644
--- a/templates/puppet/puppet.conf.d/10-main.conf.erb
+++ b/templates/puppet/puppet.conf.d/10-main.conf.erb
@@ -1,4 +1,4 @@
-# This file is managed by Puppet!
+# This file is managed by Puppet.
 #  It's assembled out of pieces from
 #  puppet:///templates/puppet/puppet.conf.d
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4283663c5089f42967131472fd9bbd7602773a69
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>

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

Reply via email to