0
私はソースからルビーをインストールしており、テンプレートを使ってパスをエクスポートしています。Ansible:configのソースprofile.d
- name: clone rbenv
git: repo=git://github.com/sstephenson/rbenv.git dest=/usr/local/rbenv
become: yes
- template: src=templates/rbenv.sh.j2 dest=/etc/profile.d/rbenv.sh
become: true
- name: clone ruby-build repo
git: repo=git://github.com/sstephenson/ruby-build.git dest=~/ruby-build
- name: Install ruby-build
shell: ./ruby-build/install.sh
become: yes
- name: install jruby
shell: . /etc/profile.d/rbenv.sh && rbenv install jruby-9.0.5.0
become: yes
私はコマンド「rbenv」を使用したい、 これは動作しますが、このように私はすべてのコマンドを使用してプロファイルを調達する必要があります。私のコードは次のようになります。 プロファイルをsources.configファイルなどで一度ソースとして使用する方法はありますか?プロファイルを再度ソーシングせずにプロジェクト全体で使用する方法はありますか。