Last active
August 29, 2015 14:08
-
-
Save FGtatsuro/74cb2b67cf67b1ed263b to your computer and use it in GitHub Desktop.
Ansibleでシェル設定の再読み込みが必要になった場合の対応 ref: http://qiita.com/FGtatsuro/items/2366c93131c47aef8dfe
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
# ~/.bashrc(~/.bash_profile) にrbenvの設定を追記する | |
- name: Set rbenv config | |
copy: src=files/bashrc dest=~/.bashrc | |
# ~/.bashrcに書き込んだ設定を読み込む | |
- name: Load rbenv setting | |
shell: source ~/.bashrc executable=/bin/bash | |
- name: Install ruby 2.1.2 | |
shell: rbenv install 2.1.2 && rbenv rehash && rbenv global 2.1.2 executable=/bin/bash |
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
# ~/.bashrc(~/.bash_profile) にrbenvの設定を追記する | |
- name: Set rbenv config | |
copy: src=files/bashrc dest=~/.bashrc | |
# lオプションによりログインシェルとしてbashを起動する | |
- name: Install ruby 2.1.2 | |
shell: /bin/bash -lc "rbenv install 2.1.2 && rbenv rehash && rbenv global 2.1.2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment