diff --git a/basic-system/handlers/main.yml b/basic-system/handlers/main.yml index 669755b2cca1a0c57c63996fdfd5078ecd597e66..4213194c888ebfe53d7eade3f8d4a5443bf1386d 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 93a6c3ca41efe49495062595f22af543d50291d1..919618c6a89a625ae144d775e678c8b74b327c72 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