Revert "refactor: improve direnv installer"
This reverts commit f9868fd388
.
This commit is contained in:
parent
f9868fd388
commit
9872fbdaf7
@ -1,25 +1,22 @@
|
||||
---
|
||||
- name: Check if direnv installed
|
||||
ansible.builtin.stat:
|
||||
path: "{{ xdg_bin_home }}/direnv"
|
||||
register: direnv_installed
|
||||
changed_when: false
|
||||
- name: Install direnv for Arch
|
||||
community.general.pacman:
|
||||
name:
|
||||
- direnv
|
||||
state: present
|
||||
when: ansible_facts.distribution == 'Archlinux'
|
||||
|
||||
- name: Create direnv working dir
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
register: direnv_work_dir
|
||||
when: not direnv_installed.stat.exists
|
||||
- name: Install direnv for Debian based systems
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- direnv
|
||||
state: present
|
||||
when: ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: Download direnv installer script
|
||||
ansible.builtin.get_url:
|
||||
url: https://direnv.net/install.sh
|
||||
dest: "{{ direnv_work_dir.path }}/install.sh"
|
||||
mode: 744
|
||||
when: not direnv_installed.stat.exists
|
||||
|
||||
- name: Install direnv
|
||||
ansible.builtin.command: "bash {{ direnv_work_dir.path }}/install.sh"
|
||||
environment:
|
||||
bin_path: "{{ xdg_bin_home }}"
|
||||
when: not direnv_installed.stat.exists
|
||||
- name: Install direnv for MacOS
|
||||
community.general.homebrew:
|
||||
name:
|
||||
- direnv
|
||||
state: present
|
||||
when: ansible_facts.distribution == 'MacOSX'
|
||||
|
Loading…
Reference in New Issue
Block a user