-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
denglei
committed
Sep 4, 2014
1 parent
825a2e7
commit 550c3f0
Showing
16 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
本文介绍使用ansible的playbook功能在centos或者redhat 6系列系统里安装1.9.3版本ruby. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: restart ntpd | ||
service: name=ntpd state=restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
galaxy_info: | ||
author: Deng Lei | ||
description: Install initializtion Software | ||
license: MIT | ||
min_ansible_version: 1.6 | ||
platforms: | ||
- name: CentOS | ||
versions: | ||
- 5 | ||
- 6 | ||
- name: Ubuntu | ||
versions: | ||
- precise | ||
categories: | ||
- system | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- name: Install initializtion require software | ||
shell: yum -y install make cmake bc gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced tar wget readline-devel libyaml-devel patch telnet dmidecode | ||
poll: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
galaxy_info: | ||
author: Deng Lei | ||
description: Delete Ruby | ||
license: MIT | ||
min_ansible_version: 1.6 | ||
platforms: | ||
- name: CentOS | ||
versions: | ||
- 6 | ||
categories: | ||
- Service | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- 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 | ||
- name: Delete Ruby Soft Link Script | ||
shell: rm -rf /usr/bin/{{ item }} | ||
with_items: | ||
- ruby | ||
- gem | ||
- bundle | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- include: delete.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ruby_version: 1.9.3 | ||
ruby_dir: /usr/local | ||
gem_version: 1.8.23 | ||
bundle_version: 1.6.3 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
galaxy_info: | ||
author: Deng Lei | ||
description: Install Ruby | ||
license: MIT | ||
min_ansible_version: 1.6 | ||
platforms: | ||
- name: CentOS | ||
versions: | ||
- 6 | ||
categories: | ||
- Service | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- name: Copy Ruby Software To Redhat Client | ||
copy: src=ruby-{{ ruby_version }}.tar.gz dest=/tmp/ruby-{{ ruby_version }}.tar.gz owner=root group=root | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Uncompression Ruby Software To Redhat Client | ||
shell: tar zxf /tmp/ruby-{{ ruby_version }}.tar.gz -C {{ ruby_dir }} | ||
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 }} | ||
with_items: | ||
- ruby | ||
- gem | ||
- bundle | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- name: Delete Ruby compression Software In Redhat Client | ||
shell: rm -rf /tmp/ruby-{{ ruby_version }}.tar.gz | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- include: copy.yml | ||
- include: delete.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ruby_version: 1.9.3 | ||
ruby_dir: /usr/local | ||
gem_version: 1.8.23 | ||
bundle_version: 1.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- hosts: "{{host}}" | ||
remote_user: "{{user}}" | ||
gather_facts: True | ||
roles: | ||
- ruby_delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- hosts: "{{host}}" | ||
remote_user: "{{user}}" | ||
gather_facts: True | ||
roles: | ||
- common | ||
- ruby_install |