def updateClient(user, host, mode, tags): print 'Provisioning %s...' % host remoteCommand = 'sudo puppet agent%s%s' % (mode, tags or '') print 'Remote command is %s' % remoteCommand # Have to ignore errors here, Puppet will return non-zero for successful runs runCommand(user, host, remoteCommand, ignore_errors=True)
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(options.user, options.remote, remoteCommand)
def updateMaster(user): 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)