ansible-roles/etc-git/tasks/main.yml
Mathieu Trossevin 7c632352a0
Replace the include module with include_tasks or import_tasks
The behaviour of the `include` module is badly defined (it try to choose
between statically importing the tasks and dynamically including them)
and can cause problems depending on any number of constraints (mostly if
it choose the wrong behaviour).

Replace it with the `import_tasks` (always statically import tasks) unless
the `include` is in a loop in which case we replace it with
`include_tasks` (always dynamically include tasks).
2023-01-03 14:43:42 +01:00

22 lines
368 B
YAML

---
- name: Git is installed (Debian)
apt:
name: git
state: present
tags:
- etc-git
when:
- ansible_distribution == "Debian"
- name: Install and configure utilities
import_tasks: utils.yml
tags:
- etc-git
- name: Configure repositories
import_tasks: repositories.yml
tags:
- etc-git
when: etc_git_config_repositories | bool