ansible-role-git/tasks/main.yml

25 lines
692 B
YAML
Raw Normal View History

2022-04-11 11:04:14 +00:00
---
2023-02-08 17:23:05 +00:00
- name: Include OS-specific variables
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
2022-04-11 11:04:14 +00:00
- name: Install git and dependencies
2023-12-20 11:05:23 +00:00
vars:
_git_package_names: "{{ git_package_names }}"
block:
- name: Add merge tool
ansible.builtin.set_fact:
2024-02-03 16:28:08 +00:00
_git_package_names: "{{ _git_package_names + [git_package_name_merge_tool] }}"
2023-12-20 11:05:23 +00:00
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 }}"
2022-04-11 11:04:14 +00:00
- name: Configure git
ansible.builtin.include_tasks: git_user.yml
2022-04-11 11:04:14 +00:00
with_dict:
2023-02-08 17:23:05 +00:00
- "{{ git_users }}"