From 90b7657b95928ef437c49705cac7bc7438b199a7 Mon Sep 17 00:00:00 2001 From: acicchetti Date: Thu, 6 Jun 2019 13:41:38 -0400 Subject: [PATCH] Moved (back) to anyenv --- playbooks/roles/common/tasks/anyenv.yml | 45 +++++++++++++++++++++++++ playbooks/roles/common/tasks/asdf.yml | 42 ----------------------- playbooks/roles/common/tasks/main.yml | 2 +- zsh/zshrc | 8 ++--- 4 files changed, 50 insertions(+), 47 deletions(-) create mode 100644 playbooks/roles/common/tasks/anyenv.yml delete mode 100644 playbooks/roles/common/tasks/asdf.yml diff --git a/playbooks/roles/common/tasks/anyenv.yml b/playbooks/roles/common/tasks/anyenv.yml new file mode 100644 index 0000000..396f068 --- /dev/null +++ b/playbooks/roles/common/tasks/anyenv.yml @@ -0,0 +1,45 @@ +--- +- name: Install anyenv + git: + repo: https://github.com/anyenv/anyenv + dest: ~/.anyenv + +- name: Ensure anyenv got installed + file: + path: ~/.anyenv + state: directory + +- name: Ensure anyenv is initialized + shell: ~/.anyenv/bin/anyenv init + args: + creates: ~/.anyenv/envs + +- name: anyenv - pyenv + shell: ~/.anyenv/bin/anyenv install pyenv + args: + creates: ~/.anyenv/envs/pyenv + +- name: anyenv - rbenv + shell: ~/.anyenv/bin/anyenv install rbenv + args: + creates: ~/.anyenv/envs/rbenv + +- name: anyenv - rbenv-gemset + git: + repo: https://github.com/jf/rbenv-gemset + dest: ~/.anyenv/envs/rbenv/plugins/rbenv-gemset + +- name: anyenv - nodejs + shell: ~/.anyenv/bin/anyenv install nodenv + args: + creates: ~/.anyenv/envs/nodenv + +- name: anyenv - erlang + shell: ~/.anyenv/bin/anyenv install erlenv + args: + creates: ~/.anyenv/envs/erlenv + +- name: anyenv - elixir + shell: ~/.anyenv/bin/anyenv install exenv + args: + creates: ~/.anyenv/envs/exenv diff --git a/playbooks/roles/common/tasks/asdf.yml b/playbooks/roles/common/tasks/asdf.yml deleted file mode 100644 index 68ce2d3..0000000 --- a/playbooks/roles/common/tasks/asdf.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: Install asdf - git: - repo: https://github.com/asdf-vm/asdf.git - dest: ~/.asdf - -- name: Ensure asdf got installed - file: - path: ~/.asdf - state: directory - -- name: asdf - python - shell: ~/.asdf/bin/asdf plugin-add python - args: - creates: ~/.asdf/plugins/python - -- name: asdf - ruby - shell: ~/.asdf/bin/asdf plugin-add ruby - args: - creates: ~/.asdf/plugins/ruby - -- name: setup default gems - file: - src: ~/.dotfiles/defaults/default-gems - dest: ~/.default-gems - state: link - force: yes - -- name: asdf - nodejs - shell: ~/.asdf/bin/asdf plugin-add nodejs - args: - creates: ~/.asdf/plugins/nodejs - -- name: asdf - erlang - shell: ~/.asdf/bin/asdf plugin-add erlang - args: - creates: ~/.asdf/plugins/erlang - -- name: asdf - elixir - shell: ~/.asdf/bin/asdf plugin-add elixir - args: - creates: ~/.asdf/plugins/elixir diff --git a/playbooks/roles/common/tasks/main.yml b/playbooks/roles/common/tasks/main.yml index 8e28966..ceda092 100644 --- a/playbooks/roles/common/tasks/main.yml +++ b/playbooks/roles/common/tasks/main.yml @@ -1,5 +1,5 @@ --- -- import_tasks: asdf.yml +- import_tasks: anyenv.yml - import_tasks: neovim.yml - import_tasks: rust.yml - import_tasks: tmux.yml diff --git a/zsh/zshrc b/zsh/zshrc index c15ee32..ac4358f 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -45,7 +45,7 @@ antigen bundle git antigen bundle command-not-found antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle zsh-users/zsh-completions -antigen bundle asdf +antigen bundle ress997/zsh-completions-anyenv if [[ ! ($(uname) -eq "Darwin") ]]; then antigen bundle matthieusb/zsh-sdkman fi @@ -120,9 +120,6 @@ compctl -K _pip_completion pip # export TERM="tmux-256color" export SHELL="/bin/zsh" -# asdf -. $HOME/.asdf/asdf.sh -. $HOME/.asdf/completions/asdf.bash export PATH="$(yarn global bin):$PATH" @@ -138,3 +135,6 @@ else printf "No zshsrc\nOne has been created" touch $HOME/.zshsrc fi + +export PATH="$PATH:$HOME/.anyenv/bin" +eval "$(anyenv init -)" -- 2.48.1