- name: Install adjtimex, ntpdate-debian and hwclock become: true apt: autoclean: yes autoremove: yes cache_valid_time: 3600 install_recommends: no # Install adjtimex, ntpdate-debian and hwclock name: ['adjtimex', 'ntpdate', 'util-linux'] state: latest update_cache: yes when: ansible_facts.os_family == 'Debian' - name: Remove ntpd become: true apt: name: ntp state: absent update_cache: no when: ansible_facts.os_family == 'Debian' - name: Install adjtimex, ntpdate and hwclock become: true dnf: # Install adjtimex, ntpdate-debian and hwclock name: ['adjtimex', 'ntpdate', 'util-linux'] state: latest update_cache: yes when: ansible_facts.os_family == 'RedHat' - name: Copy the script adjtimex.sh become: true template: src: adjtimex.sh dest: /usr/local/sbin/adjtimex.sh owner: root group: root mode: 0750 - name: Configure adjtimex weekly run become: true copy: src: adjtimex dest: /etc/cron.weekly owner: root group: root mode: '0700'