dotfiles/playbooks/roles/anyenv/tasks/main.yml
2020-07-06 16:47:50 -04:00

83 lines
2.2 KiB
YAML

---
- 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 install --force-init
args:
creates: ~/.config/anyenv/anyenv-install
- 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
- name: anyenv plugin dir
file:
path: ~/.anyenv/plugins
state: directory
- name: anyenv update plugin
shell: git clone https://github.com/znz/anyenv-update.git ~/.anyenv/plugins/anyenv-update
args:
creates: ~/.anyenv/plugins/anyenv-update
- name: pyenv virtualenv plugin
shell: git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.anyenv/envs/pyenv/plugins/pyenv-virtualenv
args:
creates: ~/.anyenv/envs/pyenv/plugins/pyenv-virtualenv
- name: pyenv default packages plugin
shell: git clone https://github.com/jawshooah/pyenv-default-packages.git ~/.anyenv/envs/pyenv/plugins/pyenv-default-packages
args:
creates: ~/.anyenv/envs/pyenv/plugins/pyenv-default-packages
- name: symlink pyenv-defaults
file:
src: ~/.dotfiles/defaults/default-packages
dest: ~/.anyenv/envs/pyenv/default-packages
state: link
- name: symlink rbenv-defaults
file:
src: ~/.dotfiles/defaults/default-gems
dest: ~/.anyenv/envs/rbenv/default-gems
state: link
- name: nodenv nvmrc plugin
shell: git clone https://github.com/ouchxp/nodenv-nvmrc.git ~/.anyenv/envs/nodenv/plugins/nodenv-nvmrc
args:
creates: ~/.anyenv/envs/nodenv/plugins/nodenv-nvmrc