Skip to content

Instantly share code, notes, and snippets.

@jamiecook
Created March 4, 2013 08:04
Show Gist options
  • Save jamiecook/5080767 to your computer and use it in GitHub Desktop.
Save jamiecook/5080767 to your computer and use it in GitHub Desktop.
capistrano to configure ntp to brisbane
desc "Configure the time zone to Australia/Brisbane"
task :timezone, :roles => [:tempest_node, :ws_node, :grid_nodes] do
sudo "apt-get -qy install ntp"
sudo "rm -f /etc/localtime"
sudo "ln -s /usr/share/zoneinfo/Australia/Brisbane /etc/localtime"
sudo "sed -i \"`grep -n ^server /etc/ntp.conf | head -n 1 | awk -F : '{print $1}'` i\\server pool.ntp.org\" /etc/ntp.conf"
sudo "/etc/init.d/ntp restart"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment