Ansibleでシェルの設定ファイル(以下、bashを使用する前提で記述する)に設定の追加が必要なソフトウェア(rbenvやnodebrew, VirtualenvWrapperなど)をインストールする場合、以下のように書いても上手く動作しない。 # ~/.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 &&