ansible-roles/etc-git
Benoît S. 76919c9649
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
etc-git: Be sure that git status is not empty before sending a mail
2019-08-14 10:50:45 +02:00
..
defaults etc-git: conditional for cron job 2018-09-08 00:27:03 +02:00
files etc-git: Be sure that git status is not empty before sending a mail 2019-08-14 10:50:45 +02:00
meta change repositories URL 2019-03-21 15:31:58 +01:00
tasks etc-git: gitignore /etc/letsencrypt/.certbot.lock 2019-06-17 15:02:17 +02:00
templates etc-git: Cron use etc-git-status.sh script 2019-08-14 10:50:45 +02:00
tests etc-git: fix specs with correct /etc directory 2017-04-21 11:23:30 +02:00
.kitchen.yml Kitchen: Change base image to evolix/ansible 2017-06-02 08:38:08 -04:00
README.md etc-git: conditional for cron job 2018-09-08 00:27:03 +02:00

etc-git

Put /etc under Git version control.

Tasks

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:
      name: etc-git
      tasks_from: commit.yml
    vars:
      commit_message: "Ansible pre-run my splendid playbook"

  roles :
  […]

  post_tasks:
  - include_role:
      name: etc-git
      tasks_from: commit.yml
    vars:
      commit_message: "Ansible post-run my splendid playbook"

Available variables

  • etc_git_monitor_status: monitor uncommited changes in /etc/.git (default: True) ;