forked from evolix/ansible-roles
etc-git: conditional for cron job
This commit is contained in:
parent
37c4898eed
commit
92f14a496f
|
@ -11,6 +11,7 @@ The **patch** part changes incrementally at each release.
|
|||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
* etc-git: manage a cron job to monitor uncommited changes in /etc/.git (default: `True`)
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -29,3 +29,7 @@ There is also an independant task that can be executed to commit changes made in
|
|||
vars:
|
||||
commit_message: "Ansible post-run my splendid playbook"
|
||||
```
|
||||
|
||||
## Available variables
|
||||
|
||||
* `etc_git_monitor_status`: monitor uncommited changes in /etc/.git (default: `True`) ;
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
---
|
||||
commit_message: Ansible run
|
||||
|
||||
etc_git_monitor_status: True
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
special_time: "hourly"
|
||||
user: root
|
||||
job: "who > /dev/null || git --git-dir=/etc/.git --work-tree=/etc status --short"
|
||||
state: present
|
||||
state: "{{ etc_git_monitor_status | bool | ternary("present","absent") }}"
|
||||
tags:
|
||||
- etc-git
|
||||
|
||||
|
@ -106,6 +106,6 @@
|
|||
hour: 21
|
||||
minute: 21
|
||||
job: "git --git-dir=/etc/.git --work-tree=/etc status --short"
|
||||
state: present
|
||||
state: "{{ etc_git_monitor_status | bool | ternary("present","absent") }}"
|
||||
tags:
|
||||
- etc-git
|
||||
|
|
Loading…
Reference in a new issue