2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | clean out the output_dir
|
2017-01-06 22:38:53 +00:00
|
|
|
file:
|
|
|
|
path: "{{ output_dir }}"
|
|
|
|
state: absent
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | create clean output_dir
|
2017-01-06 22:38:53 +00:00
|
|
|
file:
|
|
|
|
path: "{{ output_dir }}"
|
|
|
|
state: directory
|
|
|
|
|
2018-02-10 18:48:44 +00:00
|
|
|
- name: SETUP | install git
|
|
|
|
package:
|
|
|
|
name: git
|
|
|
|
when: ansible_distribution != "MacOSX"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | verify that git is installed so this test can continue
|
2017-01-06 22:38:53 +00:00
|
|
|
shell: which git
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | get git version, only newer than {{git_version_supporting_depth}} has fixed git depth
|
2017-01-06 22:38:53 +00:00
|
|
|
shell: git --version | grep 'git version' | sed 's/git version //'
|
|
|
|
register: git_version
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | get gpg version
|
2017-01-06 22:38:53 +00:00
|
|
|
shell: gpg --version 2>1 | head -1 | sed -e 's/gpg (GnuPG) //'
|
|
|
|
register: gpg_version
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | set git global user.email if not already set
|
2017-01-26 01:53:53 +00:00
|
|
|
shell: git config --global user.email || git config --global user.email "noreply@example.com"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | set git global user.name if not already set
|
2017-01-26 01:53:53 +00:00
|
|
|
shell: git config --global user.name || git config --global user.name "Ansible Test Runner"
|
2017-01-06 22:38:53 +00:00
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP | create repo_dir
|
|
|
|
file:
|
|
|
|
path: "{{ repo_dir }}"
|
|
|
|
state: directory
|