feat: add git role
This commit is contained in:
parent
e042d0e621
commit
1b66f93d77
@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: Deploy ZSH Dependencies
|
||||
- name: INstall Dependencies
|
||||
hosts: all
|
||||
roles:
|
||||
- role: git
|
||||
- role: zsh
|
||||
|
29
roles/git/tasks/install-git.yml
Normal file
29
roles/git/tasks/install-git.yml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Install git for MacOS
|
||||
community.general.homebrew:
|
||||
name: git
|
||||
state: preset
|
||||
when: ansible_facts.distribution == 'MacOSX'
|
||||
|
||||
- name: Install git for Debian based systems
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: git
|
||||
state: present
|
||||
when: ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: Enable EPL for RedHat based systems
|
||||
ansible.builtin.import_tasks: enable-epel.yml
|
||||
|
||||
- name: Install git for RedHat based systems
|
||||
become: true
|
||||
ansible.builtin.dnf:
|
||||
name: git
|
||||
state: present
|
||||
when: ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: Install git for Arch
|
||||
community.general.pacman:
|
||||
name: git
|
||||
state: present
|
||||
when: ansible_facts.distribution == 'Archlinux'
|
@ -1,2 +1,4 @@
|
||||
---
|
||||
# tasks file for git
|
||||
- name: Install Git
|
||||
ansible.builtin.import_tasks: install-git.yml
|
||||
|
Loading…
Reference in New Issue
Block a user