ansible/test/integration/targets/ansible-galaxy-collection-scm/tasks/setup.yml

20 lines
677 B
YAML
Raw Normal View History

- name: ensure git is installed
package:
name: git
when: ansible_distribution not in ["MacOSX", "Alpine"]
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'