a few updates
This commit is contained in:
parent
1570e842bb
commit
7ee98959d6
@ -18,7 +18,7 @@ Capistrano::Configuration.instance.load do
|
||||
_cset(:use_sudo) { true }
|
||||
|
||||
@dir_made = false
|
||||
|
||||
|
||||
def sudo
|
||||
use_sudo ? "sudo -p 'sudo password: '" : ""
|
||||
end
|
||||
@ -47,7 +47,7 @@ Capistrano::Configuration.instance.load do
|
||||
|
||||
desc "Rename the server"
|
||||
task :rename do
|
||||
hostname = Capistrano::CLI.ui.ask("Hostname: ")
|
||||
hostname = fetch(:hostname) || Capistrano::CLI.ui.ask("Hostname: ")
|
||||
|
||||
top.copy_skel
|
||||
run "cd #{puppet_dir} && #{sudo} ./rename #{hostname}"
|
||||
@ -57,7 +57,11 @@ Capistrano::Configuration.instance.load do
|
||||
task :copy do
|
||||
top.ensure_puppet_dir
|
||||
|
||||
Dir["*"].each { |file| top.upload file, File.join(puppet_dir, file) }
|
||||
Dir["*"].each do |file|
|
||||
if !%w{vbox}.include?(file)
|
||||
top.upload file, File.join(puppet_dir, file)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Copy skel files to remote server"
|
||||
|
@ -5,12 +5,18 @@ if [ ! $UID -eq 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
apt-get -y dist-upgrade
|
||||
apt-get install -y rubygems1.8 puppet
|
||||
apt-get remove -y puppet facter
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export PAGER=cat
|
||||
|
||||
apt-get --force-yes update
|
||||
apt-get --force-yes -y upgrade
|
||||
apt-get --force-yes -y dist-upgrade
|
||||
apt-get install --force-yes -y rubygems1.8 puppet
|
||||
apt-get remove --force-yes -y puppet facter
|
||||
|
||||
gem install puppet --no-ri --no-rdoc
|
||||
|
||||
./apply
|
||||
|
||||
shutdown -r now
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user