Skip to content
Snippets Groups Projects
user avatar
handreas authored
find . -type f -name "*.yml" -print0 | xargs -0 sed -i 's/\s*$//g'
5575c34d
History
Name Last commit Last update
..
tasks
templates
vars
README.md

This role sets the timezone on the desired server.

  • installs a templated file into /etc/ntp.conf. The variable NTP_SERVER sets the ntp server
    • NTP_SERVER defaults to ntp.monash.edu.au
  • starts and enables the ntpd process
  • Makes a link from /etc/localtime state=link to path defined by Variable TIMEZONE_PATH
    • TIMEZONE_PATH defaults to /usr/share/zoneinfo/Australia/Melbourne

Example of use

  • { role: set_timezone } #sets to Melbourne time
  • { role: set_timezone, TIMEZONE_PATH: "/usr/share/zoneinfo/Australia/Perth" } #sets to Perth time
  • { role: set_timezone, TIMEZONE_PATH: "/usr/share/zoneinfo/Australia/Perth", NTP_SERVER: "time.google.com" } #sets to Perth time and using google ntp server