First commit
This commit is contained in:
commit
e54b5a5663
24 changed files with 3047 additions and 0 deletions
24
roles/jenkins-php-v1/tasks/00_precheck.yml
Normal file
24
roles/jenkins-php-v1/tasks/00_precheck.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
|
||||
# Etckeeper is a small fondness of mine, it semi-automatically
|
||||
# keep track of /etc with git.
|
||||
# Feel free to remove all this if you'rs not interested.
|
||||
- name: detect etckeeper presence
|
||||
shell: "which etckeeper"
|
||||
ignore_errors: True
|
||||
register: tmp
|
||||
changed_when: False
|
||||
|
||||
- name: Set fact about etckeeper presence
|
||||
set_fact:
|
||||
etckeeper_installed: "{{ tmp.rc == 0 }}"
|
||||
|
||||
- name: Check that /etc is clean
|
||||
shell: etckeeper unclean && echo "Uncommitted changes." && return 1 || return 0
|
||||
ignore_errors: True # we add a 'fail' task to tell the problem more explictly.
|
||||
register: tmp
|
||||
changed_when: False
|
||||
when: etckeeper_installed
|
||||
- fail:
|
||||
msg: "Etckeeper is installed but there is uncommitted changes in /etc."
|
||||
when: etckeeper_installed and tmp.rc != 0
|
Reference in a new issue