39 lines
1018 B
YAML
39 lines
1018 B
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: git
|
|
## Description: leading vcs software
|
|
## Version: latest
|
|
## Methods: [system]
|
|
---
|
|
- name: Set git default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
git:
|
|
methods:
|
|
- system
|
|
# }}}
|
|
- name: Configure git
|
|
when:
|
|
- "'git' not in __configured"
|
|
block:
|
|
- name: Set git install method
|
|
when:
|
|
- git_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
git_imethod: "{{ imethod if imethod in git.methods else git.methods[0] }}"
|
|
|
|
- name: Configure git system install
|
|
when:
|
|
- git_imethod == "system"
|
|
block:
|
|
- name: Append git to pkg_sys
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + ['git'] }}"
|
|
|
|
- name: Finalise git system install
|
|
ansible.builtin.set_fact:
|
|
git_install: "{{ git_imethod }}=git"
|
|
|
|
- name: Finalize git configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'git': git_install } ) }}"
|