Created
November 29, 2013 19:33
-
-
Save jshirley/7710824 to your computer and use it in GitHub Desktop.
Start of the plenv ansible gist that I'm using for TDP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: plenv | update plenv repo | |
git: repo=git://github.com/tokuhirom/plenv.git dest=$plenv_root | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | install perl-build | |
git: repo=git://github.com/tokuhirom/Perl-Build.git dest=/home/{{ plenv_user }}/.plenv/plugins/perl-build | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | add plenv initialization to profile | |
template: src=plenv.sh.j2 dest=/etc/profile.d/plenv.sh owner=root group=root mode=0755 | |
- name: plenv | try to set global perl | |
shell: PLENV_ROOT=${plenv_root} PATH=${plenv_root}/bin:$PATH plenv global $perl_version chdir=$plenv_root | |
register: global_perl | |
ignore_errors: True | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | install perl | |
shell: PLENV_ROOT=${plenv_root} PATH=${plenv_root}/bin:$PATH plenv install $perl_version chdir=$plenv_root | |
when: global_perl|failed | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | try to set global perl | |
shell: PLENV_ROOT=${plenv_root} PATH=${plenv_root}/bin:$PATH plenv global $perl_version chdir=$plenv_root | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | install cpanm | |
shell: PLENV_ROOT=${plenv_root} PATH=${plenv_root}/bin:$PATH plenv install-cpanm chdir=$plenv_root | |
sudo: True | |
sudo_user: ${plenv_user} | |
- name: plenv | rehash | |
shell: PLENV_ROOT=${plenv_root} PATH=${plenv_root}/bin:$PATH plenv rehash chdir=$plenv_root | |
sudo: True | |
sudo_user: ${plenv_user} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PLENV_ROOT="{{ plenv_root }}" | |
export PATH="{{ plenv_root }}/bin:$PATH" | |
eval "$(plenv init -)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
user: tdp | |
plenv_user: tdp | |
plenv_root: /home/tdp/.plenv | |
perl_version: 5.14.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome thank you!