From e137e032f83a63c288e962cc3dba508bd7a00ca3 Mon Sep 17 00:00:00 2001 From: Jaap Eldering Date: Sat, 13 Apr 2024 14:47:01 +0200 Subject: [PATCH] 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. --- .../ansible/roles/base_packages/defaults/main.yml | 1 + provision-contest/ansible/roles/system_fixes/tasks/main.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/provision-contest/ansible/roles/base_packages/defaults/main.yml b/provision-contest/ansible/roles/base_packages/defaults/main.yml index 8dd4b2a6..de5122d4 100644 --- a/provision-contest/ansible/roles/base_packages/defaults/main.yml +++ b/provision-contest/ansible/roles/base_packages/defaults/main.yml @@ -16,6 +16,7 @@ INSTALLED_PACKAGES: - debootstrap - default-jdk-headless - efibootmgr + - etckeeper - fontconfig - g++ - gcc diff --git a/provision-contest/ansible/roles/system_fixes/tasks/main.yml b/provision-contest/ansible/roles/system_fixes/tasks/main.yml index 57cace08..358bf659 100644 --- a/provision-contest/ansible/roles/system_fixes/tasks/main.yml +++ b/provision-contest/ansible/roles/system_fixes/tasks/main.yml @@ -65,5 +65,11 @@ line: 'DNS=8.8.8.8' notify: Reboot the machine +- name: Enable etckeeper autocommits every hour + file: + src: /etc/cron.daily/etckeeper + dest: /etc/cron.hourly/etckeeper + state: link + - name: Flush handlers meta: flush_handlers