Commit 79cb5c3a by Maruyama Takayuki

roles/ruby: partial fix for ansible/ansible-modules-core issue 2936

parent befdb8f6
...@@ -2,36 +2,44 @@ ...@@ -2,36 +2,44 @@
- name: is exists source archive - name: is exists source archive
command: ls -l "{{ruby_src_archive}}" command: ls -l "{{ruby_src_archive}}"
ignore_errors: true ignore_errors: true
register: already_downloaded register: ruby_downloaded
- name: already installed #- name: download and extract
command: which ruby # unarchive:
ignore_errors: true # src: "{{ruby_src_url}}"
register: already_installed # dest: "{{src_dir}}"
# copy: no
# when: ruby_downloaded|failed
- name: download
get_url:
url: "{{ruby_src_url}}"
dest: "{{ruby_src_archive}}"
when: ruby_downloaded|failed
become: yes
- name: download and extract - name: extract
unarchive: command: /bin/tar xvf "{{ruby_src_archive}}" -C "{{src_dir}}"
src: "{{ruby_src_url}}" become: yes
dest: "{{src_dir}}" when: ruby_downloaded|failed
copy: no
when: not already_downloaded - name: chown
command: "/bin/chown -R {{ansible_ssh_user}} {{ruby_src_dir}}"
become: yes
- name: configure - name: configure
command: ./configure --prefix=/usr/ command: ./configure --prefix=/usr/
args: args:
chdir: "{{ruby_src_dir}}" chdir: "{{ruby_src_dir}}"
when: not already_downloaded or not already_installed
- name: make - name: make
command: /usr/bin/make command: /usr/bin/make
args: args:
chdir: "{{ruby_src_dir}}" chdir: "{{ruby_src_dir}}"
when: not already_downloaded or not already_installed
- name: install - name: install
command: /usr/bin/make install command: /usr/bin/make install
args: args:
chdir: /tmp/ruby-2.1.8 chdir: "{{ruby_src_dir}}"
become: yes become: yes
when: not already_downloaded or not already_installed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment