29 lines
656 B
YAML
29 lines
656 B
YAML
---
|
|
- name: Check if direnv is installed
|
|
ansible.builtin.command: which direnv
|
|
register: direnv_installed
|
|
failed_when: direnv_installed.rc > 1
|
|
changed_when: false
|
|
|
|
- name: Install direnv for Arch
|
|
community.general.pacman:
|
|
name:
|
|
- direnv
|
|
state: present
|
|
when: ansible_facts.distribution == 'Archlinux'
|
|
|
|
- name: Install direnv for Debian based systems
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name:
|
|
- direnv
|
|
state: present
|
|
when: ansible_facts.os_family == 'Debian'
|
|
|
|
- name: Install direnv for MacOS
|
|
community.general.homebrew:
|
|
name:
|
|
- direnv
|
|
state: present
|
|
when: ansible_facts.distribution == 'MacOSX'
|