---
  # Parameters:
  #  prudentia_dir (provided)
  #  tz: time zone
  #  ntp_server_address: ntp server address(es) (provided)
  #
  # Example usage:
  #  - include: "{{prudentia_dir}}/tasks/timezone.yml tz={{tz}}"

  - name: Set default timezone
    shell: echo {{tz}} > /etc/timezone
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

  - name: Reconfigure timezone data
    command: dpkg-reconfigure -f noninteractive tzdata
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

  - name: Schedule daily NTP update
    cron: name="ntp-update" minute="{{ 59 |random }}" hour="{{ 5 |random }}/6" job="/usr/sbin/ntpdate {{ntp_server_address}} > /dev/null"
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

---
  # Parameters:
  #  prudentia_dir (provided)
  #  tz: time zone
  #  ntp_server_address: ntp server address(es) (provided)
  #
  # Example usage:
  #  - include: "{{prudentia_dir}}/tasks/timezone.yml tz={{tz}}"

  - name: Set default timezone
    shell: echo {{tz}} > /etc/timezone
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

  - name: Reconfigure timezone data
    command: dpkg-reconfigure -f noninteractive tzdata
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

  - name: Schedule daily NTP update
    cron: name="ntp-update" minute="{{ 59 |random }}" hour="*/6" job="/usr/sbin/ntpdate {{ntp_server_address}} > /dev/null"
    when: ansible_os_family == "Debian"
    become: yes
    tags:
      - timezone

Fix hour definition (broken in 1{5,6}.04)
fix(crontab): Fix hour definition (broken in 1{5,6}.04)
