1
0
Fork 0
This repository has been archived on 2023-11-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ansible-jenkins-php-v1/roles/jenkins-php-v1/tasks/00_precheck.yml

21 lines
619 B
YAML
Raw Normal View History

2020-01-17 23:35:15 +01:00
---
# 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
2020-01-17 23:45:11 +01:00
when: checketckeeper is undefined or checketckeeper
2020-01-17 23:35:15 +01:00
- name: Set fact about etckeeper presence
set_fact:
2020-01-17 23:45:11 +01:00
etckeeper_installed: "{{ tmp.rc is defined and tmp.rc == 0 }}"
2020-01-17 23:35:15 +01:00
- name: Check that /etc is clean
shell: etckeeper unclean && echo "Uncommitted changes." && return 1 || return 0
changed_when: False
when: etckeeper_installed