From bc03a4dc2d7dc5115375550697b2b4803c0c9cc9 Mon Sep 17 00:00:00 2001 From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de> Date: Wed, 29 Jan 2020 15:21:02 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20track=20Proxmox=20cluster=20con?= =?UTF-8?q?fig=20w/=20etckeeper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic-system/handlers/main.yml | 7 +++++++ basic-system/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/basic-system/handlers/main.yml b/basic-system/handlers/main.yml index 669755b..4213194 100644 --- a/basic-system/handlers/main.yml +++ b/basic-system/handlers/main.yml @@ -18,3 +18,10 @@ - name: gather minimal standard facts once again setup: gather_subset=min + +- name: Remove pve directory from etckeeper repo + # 303 wants us to use the ansible git module, but it doesn’t + # provide that feature + shell: # noqa 303 + chdir: /etc + cmd: git rm --cached -r -- pve && git commit -m "'Remove pve directory'" diff --git a/basic-system/tasks/main.yml b/basic-system/tasks/main.yml index 93a6c3c..919618c 100644 --- a/basic-system/tasks/main.yml +++ b/basic-system/tasks/main.yml @@ -20,6 +20,24 @@ - lsb - meta: flush_handlers +- name: Check for Proxmox + stat: + path: /etc/pve + register: pve_present + tags: + - etckeeper + +- name: Ignore Proxmox config in etckeeper + lineinfile: + path: /etc/.gitignore + line: /pve + create: true + when: etckeeper and pve_present + notify: + - Remove pve directory from etckeeper repo + tags: + - etckeeper + - name: Install etckeeper apt: name: etckeeper -- GitLab