File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 4242 path : /etc/cron.d/ansible-drift
4343 state : absent
4444
45+ - name : Copy systemd service and timer configs
46+ ansible.builtin.template :
47+ dest : " /etc/systemd/system/{{ item }}"
48+ mode : " 0644"
49+ src : " systemd/{{ item }}.j2"
50+ loop :
51+ - ansible-drift.service
52+ - ansible-drift.timer
53+ when : drift_playbook|d()
54+
55+ - name : Enable systemd timer
56+ ansible.builtin.systemd_service :
57+ daemon_reload : true
58+ enabled : true
59+ name : ansible-drift.timer
60+ state : started
61+ when :
62+ - drift_playbook|d()
63+ - not ansible_check_mode
64+
4565- name : Make sure we have .gnupg dir
4666 ansible.builtin.file :
4767 path : /home/{{ drift_user }}/.gnupg
Original file line number Diff line number Diff line change 1+ [Unit]
2+ After=network-online.target
3+ Description=ansible-drift
4+ Wants=network-online.target
5+
6+ [Service]
7+ ExecStart=/usr/local/bin/ansible-drift {{ drift_playbook }}
8+ Type=simple
9+ User={{ drift_user }}
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description=ansible-drift
3+
4+ [Timer]
5+ OnCalendar=*-*-* 05:00:00
6+ Persistent=True
7+
8+ [Install]
9+ WantedBy=timers.target
You can’t perform that action at this time.
0 commit comments