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