Skip to content

Commit

Permalink
add ruby 2.1.2 example
Browse files Browse the repository at this point in the history
  • Loading branch information
denglei committed Sep 4, 2014
1 parent d32bb62 commit 3cb192f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions ruby_install_2.1.2/roles/ruby_delete/tasks/delete.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
- name: Stop Ruby Service In RedHat Client
shell: ps -ef|grep ruby|grep -v grep|awk '{print $2}'|xargs kill -9 >>/dev/null
ignore_errors: yes
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
- name: Delete Ruby Install Dir In RedHat Client
shell: rm -rf {{ ruby_dir}}/ruby-{{ ruby_version }}
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
Expand All @@ -11,4 +7,13 @@
- ruby
- gem
- bundle
ignore_errors: yes
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
- name: Recovery Old Ruby Soft Link Script
shell: mv -f /usr/bin/{{ item }}_back /usr/bin/{{ item }}
with_items:
- ruby
- gem
- bundle
ignore_errors: yes
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
4 changes: 2 additions & 2 deletions ruby_install_2.1.2/roles/ruby_install/tasks/copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
shell: tar zxf /tmp/ruby-{{ ruby_version }}.tar.gz -C {{ ruby_dir }}
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
- name: Delete Ruby Software Variable In Redhat Client
shell: rm -rf /usr/bin/{{ item }}
shell: cp -a -f /usr/bin/{{ item }} /usr/bin/{{ item }}_back
with_items:
- ruby
- gem
- bundle
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
- name: Copy Redis Config To Redhat Client
shell: ln -s {{ ruby_dir }}/ruby-{{ ruby_version }}/bin/{{ item }} /usr/bin/{{ item }}
shell: ln -s -f {{ ruby_dir }}/ruby-{{ ruby_version }}/bin/{{ item }} /usr/bin/{{ item }}
with_items:
- ruby
- gem
Expand Down

0 comments on commit 3cb192f

Please sign in to comment.