etc-git: do not erase custom entries of servers in .gitignore files
This commit is contained in:
parent
534efdcc01
commit
8e3b4b35cd
|
@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- evocheck: execute evocheck without --cron the first of the month
|
- evocheck: execute evocheck without --cron the first of the month
|
||||||
- etc-git: chmod 600 for local periodic files (daily, weekly, monthly)
|
- etc-git: chmod 600 for local periodic files (daily, weekly, monthly)
|
||||||
- base: loop over fstab entries instead of copying the same task for each entries
|
- base: loop over fstab entries instead of copying the same task for each entries
|
||||||
|
- etc-git: do not erase custom entries of servers in .gitignore files
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
aliases.db
|
|
||||||
*.swp
|
|
||||||
random.seed
|
|
||||||
openvpn/ipp.txt
|
|
|
@ -3,6 +3,11 @@
|
||||||
- include: repository.yml
|
- include: repository.yml
|
||||||
vars:
|
vars:
|
||||||
repository_path: "/etc"
|
repository_path: "/etc"
|
||||||
|
gitignore_items:
|
||||||
|
- "aliases.db"
|
||||||
|
- "*.swp"
|
||||||
|
- "random.seed"
|
||||||
|
- "openvpn/ipp.txt"
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
|
@ -16,6 +21,7 @@
|
||||||
- include: repository.yml
|
- include: repository.yml
|
||||||
vars:
|
vars:
|
||||||
repository_path: "/usr/share/scripts"
|
repository_path: "/usr/share/scripts"
|
||||||
|
gitignore_items: []
|
||||||
when:
|
when:
|
||||||
- _usr_share_scripts.stat.exists
|
- _usr_share_scripts.stat.exists
|
||||||
- _usr_share_scripts.stat.isdir
|
- _usr_share_scripts.stat.isdir
|
||||||
|
|
|
@ -30,10 +30,19 @@
|
||||||
|
|
||||||
- name: "{{ repository_path }}/.gitignore is present"
|
- name: "{{ repository_path }}/.gitignore is present"
|
||||||
copy:
|
copy:
|
||||||
src: "gitignore{{ repository_path | replace('/','_') }}"
|
src: gitignore
|
||||||
dest: "{{ repository_path }}/.gitignore"
|
dest: "{{ repository_path }}/.gitignore"
|
||||||
owner: root
|
owner: root
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
force: no
|
||||||
|
tags:
|
||||||
|
- etc-git
|
||||||
|
|
||||||
|
- name: "Some entries MUST be in the {{ repository_path }}/.gitignore file"
|
||||||
|
lineinfile:
|
||||||
|
dest: "{{ repository_path }}/.gitignore"
|
||||||
|
line: "{{ item }}"
|
||||||
|
loop: "{{ gitignore_items | default([]) }}"
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue