Ansible/roles/geerlingguy.git/tasks/main.yml

25 lines
640 B
YAML

---
- name: Ensure git is installed (RedHat).
package:
name: "{{ git_packages }}"
state: present
enablerepo: "{{ git_enablerepo | default(omit, true) }}"
when:
- not git_install_from_source | bool
- ansible_os_family == 'RedHat'
- name: Update apt cache (Debian).
apt: update_cache=true cache_valid_time=86400
when: ansible_os_family == 'Debian'
- name: Ensure git is installed (Debian).
apt:
name: "{{ git_packages }}"
state: present
when:
- not git_install_from_source | bool
- ansible_os_family == 'Debian'
- import_tasks: install-from-source.yml
when: git_install_from_source | bool