2016-11-07 14:00:57 +01:00
|
|
|
# etc-git
|
2016-11-15 18:23:53 +01:00
|
|
|
|
2016-11-07 14:00:57 +01:00
|
|
|
Put /etc under Git version control.
|
2016-11-15 18:23:53 +01:00
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
2017-04-25 10:06:42 +02:00
|
|
|
The main part (installation and configuration) is in the `tasks/main.yml` file.
|
|
|
|
|
|
|
|
There is also an independant task that can be executed to commit changes made in `/etc/.git`, for example when a playbook is run :
|
|
|
|
|
|
|
|
```
|
|
|
|
- name: My Splendid Playbook
|
|
|
|
[…]
|
|
|
|
|
|
|
|
pre_tasks:
|
|
|
|
- include_role:
|
2019-11-29 14:00:25 +01:00
|
|
|
name: evolix/etc-git
|
2017-07-27 22:51:35 +02:00
|
|
|
tasks_from: commit.yml
|
2017-04-25 10:06:42 +02:00
|
|
|
vars:
|
|
|
|
commit_message: "Ansible pre-run my splendid playbook"
|
|
|
|
|
|
|
|
roles :
|
|
|
|
[…]
|
|
|
|
|
|
|
|
post_tasks:
|
|
|
|
- include_role:
|
2019-11-29 14:00:25 +01:00
|
|
|
name: evolix/etc-git
|
2017-07-27 22:51:35 +02:00
|
|
|
tasks_from: commit.yml
|
2017-04-25 10:06:42 +02:00
|
|
|
vars:
|
2017-08-29 17:22:21 +02:00
|
|
|
commit_message: "Ansible post-run my splendid playbook"
|
2017-04-25 10:06:42 +02:00
|
|
|
```
|
2018-09-08 00:27:03 +02:00
|
|
|
|
|
|
|
## Available variables
|
|
|
|
|
|
|
|
* `etc_git_monitor_status`: monitor uncommited changes in /etc/.git (default: `True`) ;
|