Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Configure .gitattributes to not diff backup files. #9

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
group=0
mode=0644

- name: Install .gitattributes configuration
tags: etckeeper
become: true
template:
src=etckeeper.gitattributes.j2
dest=/etc/.gitattributes
owner=0
group=0
mode=0644
when: etckeeper_vcs == 'git'


- name: Install etckeeper packages
tags: etckeeper
Expand Down
20 changes: 20 additions & 0 deletions templates/etckeeper.gitattributes.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% if util_template_use_cow %}
# --------------------
# ( Managed by Ansible )
# --------------------
# o . . .
# o . . . ` ,
# o .; . : .' : : : .
# o i..`: i` i.i.,i i .
# o `,--.|i |i|ii|ii|i:
# UooU\.'@@@@@@`.||'
# \__/(@@@@@@@@@@)'
# (@@@@@@@@)
# `YY~~~~YY'
# || ||
{% else %}
# {{ ansible_managed }}
{% endif %}

# Usually there is no need to diff backup files.
*- -diff