task :install_prerequisites, :max_hosts => MAX_HOSTS do
run "mkdir -p #{puppet_destination}"
- run "#{sudo} apt-get update"
- run "#{sudo} apt-get install -y puppet ruby-hiera-puppet rsync"
+ run "apt-get update"
+ run "apt-get install -y puppet ruby-hiera-puppet rsync"
end
#task :update_platform, :max_hosts => MAX_HOSTS do
end
def prepare
- run "mkdir -p #{puppet_destination}"
- run "#{sudo} chown -R $USER: #{puppet_destination}"
+ #run "mkdir -p #{puppet_destination}"
+ #run "#{sudo} chown -R $USER: #{puppet_destination}"
end
def noop
def lock
if should_lock?
- run <<-GETLOCK
+ cmd = <<-GETLOCK
if [ ! -f #{puppet_lock_file} ]; then
touch #{puppet_lock_file};
else
exit 1;
fi
GETLOCK
+ run cmd.gsub(/\s+/, ' ')
end
end
def unlock
- run "#{sudo} rm -f #{puppet_lock_file}; true" if should_lock?
+ run "rm -f #{puppet_lock_file}; true" if should_lock?
end
private