Only set git config during test if unset.

This makes the git test less destructive.
This commit is contained in:
Matt Clay 2017-01-25 17:53:53 -08:00
parent 2750fc0c7f
commit 5d5e5e25a2

View file

@ -21,8 +21,11 @@
shell: gpg --version 2>1 | head -1 | sed -e 's/gpg (GnuPG) //'
register: gpg_version
- name: set dummy git config
shell: git config --global user.email "noreply@example.com"; git config --global user.name "Ansible Test Runner"
- name: set git global user.email if not already set
shell: git config --global user.email || git config --global user.email "noreply@example.com"
- name: set git global user.name if not already set
shell: git config --global user.name || git config --global user.name "Ansible Test Runner"
- name: create repo_dir
file: path={{repo_dir}} state=directory