2020-05-29 19:33:32 +02:00
|
|
|
- name: ensure git is installed
|
|
|
|
package:
|
|
|
|
name: git
|
2020-08-07 21:28:10 +02:00
|
|
|
when: ansible_distribution not in ["MacOSX", "Alpine"]
|
2020-05-29 19:33:32 +02:00
|
|
|
register: git_install
|
|
|
|
|
|
|
|
- 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 a directory for installing collections and creating git repositories
|
|
|
|
file:
|
|
|
|
path: '{{ item }}'
|
|
|
|
state: directory
|
|
|
|
loop:
|
|
|
|
- '{{ galaxy_dir }}/ansible_collections'
|
|
|
|
- '{{ galaxy_dir }}/development/ansible_test'
|