Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: kick.py

Issue 6009686776086528: Issue 2382 - Remove hard-coded Puppet-master reference in updateMaster() (Closed)
Patch Set: Created April 21, 2015, 1:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: kick.py
diff --git a/kick.py b/kick.py
index dc85d2b5aa3f9a082ba8eb401529fd2230397dda..f1a54b2c28c94625373460fe74831c9e46607678 100755
--- a/kick.py
+++ b/kick.py
@@ -37,14 +37,14 @@ def parseOptions(args):
return options
-def updateMaster(user):
+def updateMaster(options):
print 'Updating data on the puppet master...'
remoteCommand = ' && '.join([
'sudo hg pull -qu -R /etc/puppet/infrastructure',
'sudo hg pull -qu -R /etc/puppet/infrastructure/modules/private',
'sudo /etc/puppet/infrastructure/ensure_dependencies.py /etc/puppet/infrastructure',
])
- runCommand(user, 'puppetmaster.adblockplus.org', remoteCommand)
+ runCommand(options.user, options.remote, remoteCommand)
def updateClient(user, host, mode):
print 'Provisioning %s...' % host
@@ -55,7 +55,7 @@ def updateClient(user, host, mode):
if __name__ == '__main__':
options = parseOptions(sys.argv[1:])
- updateMaster(options.user)
+ updateMaster(options)
needKicking = resolveHostList(options)
if len(needKicking) == 0:
print >>sys.stderr, 'No valid hosts or groups specified, nothing to do'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld