+++ /dev/null
-- name: "adjtimex: sync time and adjust kernel coefficients"
- hosts: "{{ hosts | default('all') }}"
- gather_facts: false
- become: true
- tasks:
- - name: Copy the script adjtimex.sh
- copy:
- src: ~/admin/prog/adjtimex.sh
- dest: /usr/local/sbin/adjtimex.sh
- owner: root
- group: root
- mode: 0750
- - name: Run adjtimex.sh
- command: /usr/local/sbin/adjtimex.sh
--- /dev/null
+- name: Copy the script adjtimex.sh
+ copy:
+ src: ~/admin/prog/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'