1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
--- # tasks file for ntp - name: include assert.yml include_tasks: assert.yml run_once: yes - name: install ntp packages package: name: "{{ ntp_packages }}" state: present - name: configure /etc/{{ ntp_configuration_file }} template: src: "{{ ntp_configuration_file }}.j2" dest: /etc/{{ ntp_configuration_file }} mode: "0644" notify: - restart ntp/chrony - name: install timezone information package: name: "{{ ntp_timezone_packages }}" state: present - name: configure timezone timezone: name: "{{ ntp_timezone }}" when: - ntp_timezone_supported | bool notify: - restart cron - name: start and enable {{ ntp_service }} service: name: "{{ ntp_service }}" state: started enabled: yes