Commit 79cb5c3a by Maruyama Takayuki

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

parent befdb8f6
......@@ -2,36 +2,44 @@
- name: is exists source archive
command: ls -l "{{ruby_src_archive}}"
ignore_errors: true
register: already_downloaded
register: ruby_downloaded
- name: already installed
command: which ruby
ignore_errors: true
register: already_installed
#- name: download and extract
# unarchive:
# src: "{{ruby_src_url}}"
# 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
unarchive:
src: "{{ruby_src_url}}"
dest: "{{src_dir}}"
copy: no
when: not already_downloaded
- name: extract
command: /bin/tar xvf "{{ruby_src_archive}}" -C "{{src_dir}}"
become: yes
when: ruby_downloaded|failed
- name: chown
command: "/bin/chown -R {{ansible_ssh_user}} {{ruby_src_dir}}"
become: yes
- name: configure
command: ./configure --prefix=/usr/
args:
chdir: "{{ruby_src_dir}}"
when: not already_downloaded or not already_installed
- name: make
command: /usr/bin/make
args:
chdir: "{{ruby_src_dir}}"
when: not already_downloaded or not already_installed
- name: install
command: /usr/bin/make install
args:
chdir: /tmp/ruby-2.1.8
chdir: "{{ruby_src_dir}}"
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