feat: add asdf package manager and elixir
This commit is contained in:
parent
199f194147
commit
975d0afc31
4 changed files with 32 additions and 0 deletions
1
dev.yml
1
dev.yml
|
@ -1,6 +1,7 @@
|
|||
- name: Development environment
|
||||
hosts: odhosts
|
||||
roles:
|
||||
- asdf
|
||||
- golang
|
||||
- python
|
||||
- docker
|
||||
|
|
10
roles/asdf/files/elixir.sh
Executable file
10
roles/asdf/files/elixir.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
ASDF_DIR=$HOME/src/asdf . ~/src/asdf/asdf.sh
|
||||
|
||||
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
|
||||
asdf global erlang 27.0
|
||||
asdf install erlang 27.0
|
||||
|
||||
asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git
|
||||
asdf global elixir 1.16
|
||||
asdf install elixir 1.16
|
16
roles/asdf/tasks/main.yml
Normal file
16
roles/asdf/tasks/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
- name: Clone asdf
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/asdf-vm/asdf.git
|
||||
dest: "{{ ansible_env.HOME }}/src/asdf"
|
||||
version: v0.14.0
|
||||
- name: Install plugin dependencies
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
pkg:
|
||||
- build-essential
|
||||
- autoconf
|
||||
- m4
|
||||
- unzip
|
||||
- name: Install erlang and elixir
|
||||
ansible.builtin.script:
|
||||
cmd: files/elixir.sh
|
|
@ -49,3 +49,8 @@ fi
|
|||
|
||||
# Firefox
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
|
||||
# Asdf - elixir, nodejs manager
|
||||
if [ -d "$HOME/src/asdf" ] ; then
|
||||
. "$HOME/src/asdf/asdf.sh"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue