Skip to content

Commit 3556b94

Browse files
elderingmeisterT
authored andcommitted
Install etckeeper and run hourly
This automatically logs all changes made to /etc in git and is useful for debugging purposes, while it doesn't hurt.
1 parent d5522ff commit 3556b94

File tree

2 files changed

+9
-0
lines changed
  • provision-contest/ansible/roles

2 files changed

+9
-0
lines changed

provision-contest/ansible/roles/base_packages/defaults/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ INSTALLED_PACKAGES:
1616
- debootstrap
1717
- default-jdk-headless
1818
- efibootmgr
19+
- etckeeper
1920
- fontconfig
2021
- g++
2122
- gcc

provision-contest/ansible/roles/system_fixes/tasks/main.yml

+8
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,13 @@
6565
line: 'DNS=8.8.8.8'
6666
notify: Reboot the machine
6767

68+
- name: stat /etc/cron.daily/etckeeper
69+
stat: path=/etc/cron.daily/etckeeper
70+
register: daily_etckeeper
71+
72+
- name: Enable etckeeper autocommits every hour
73+
command: mv /etc/cron.daily/etckeeper /etc/cron.hourly/etckeeper
74+
when: daily_etckeeper.stat.exists
75+
6876
- name: Flush handlers
6977
meta: flush_handlers

0 commit comments

Comments
 (0)