fc692cf65b
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
Use “when: not ansible_check_mode” or “when <file>.stat.exists or not
ansible_check_mode” in order to provide a meaningful diff if possible.
This is an improvement from the previously reverted commit
1728eaee68
.
30 lines
515 B
YAML
30 lines
515 B
YAML
---
|
|
|
|
- name: Git is installed (Debian)
|
|
apt:
|
|
name: git
|
|
state: present
|
|
tags:
|
|
- etc-git
|
|
when:
|
|
- ansible_distribution == "Debian"
|
|
- not ansible_check_mode
|
|
|
|
- name: Install and configure utilities
|
|
include: utils.yml
|
|
tags:
|
|
- etc-git
|
|
|
|
- name: Is git present?
|
|
stat:
|
|
path: /usr/bin/git
|
|
register: _git
|
|
|
|
- name: Configure repositories
|
|
include: repositories.yml
|
|
tags:
|
|
- etc-git
|
|
when:
|
|
- etc_git_config_repositories | bool
|
|
- _git.stat.exists or not ansible_check_mode
|