ansible-role-git/tasks/main.yml
Markus Pesch a96a2ff09a
All checks were successful
continuous-integration/drone/push Build is passing
style: remove obsolete whitespaces
2024-02-03 17:28:08 +01:00

25 lines
692 B
YAML

---
- name: Include OS-specific variables
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
- name: Install git and dependencies
vars:
_git_package_names: "{{ git_package_names }}"
block:
- name: Add merge tool
ansible.builtin.set_fact:
_git_package_names: "{{ _git_package_names + [git_package_name_merge_tool] }}"
when: git_install_merge_tool is defined and
git_install_merge_tool
- name: Install git and dependencies
ansible.builtin.package:
name: "{{ item }}"
state: present
with_items: "{{ _git_package_names }}"
- name: Configure git
ansible.builtin.include_tasks: git_user.yml
with_dict:
- "{{ git_users }}"