summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-galaxy-collection-scm/tasks/setup.yml
blob: bb882c9d796a09a7c3d7b08a5b21b09d8153d5af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- 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:
    - '{{ install_path }}'
    - '{{ test_repo_path }}'