-
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
6d4d635
commit 825a2e7
Showing
16 changed files
with
124 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系列系统里安装2.0.0的git. |
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: | ||
- git_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 | ||
- git_install |
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 Git | ||
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,27 @@ | ||
- name: Delete Git Install Dir In RedHat Client | ||
shell: rm -rf {{ git_dir}}/git-{{ git_version }} | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Delete Git Soft Link Script | ||
shell: rm -rf /usr/bin/{{ item }} | ||
with_items: | ||
- git | ||
- git-cvsserver | ||
- gitk | ||
- git-receive-pack | ||
- git-shell | ||
- git-upload-archive | ||
- git-upload-pack | ||
ignore_errors: yes | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Recovery Old Git Soft Link Script | ||
shell: mv -f /usr/bin/{{ item }}_back /usr/bin/{{ item }} | ||
with_items: | ||
- git | ||
- git-cvsserver | ||
- gitk | ||
- git-receive-pack | ||
- git-shell | ||
- git-upload-archive | ||
- git-upload-pack | ||
ignore_errors: yes | ||
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,2 @@ | ||
git_version: 2.0.0 | ||
git_dir: /usr/local |
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 Git | ||
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,3 @@ | ||
- name: Delete Git compression Software In Redhat Client | ||
shell: rm -rf /tmp/git-{{ git_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,28 @@ | ||
- name: Copy Git Software To Redhat Client | ||
copy: src=git-{{ git_version }}.tar.gz dest=/tmp/git-{{ git_version }}.tar.gz owner=root group=root | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Uncompression Git Software To Redhat Client | ||
shell: tar zxf /tmp/git-{{ git_version }}.tar.gz -C {{ git_dir }} | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Delete Git Software Variable In Redhat Client | ||
shell: cp -a -f /usr/bin/{{ item }} /usr/bin/{{ item }}_back | ||
with_items: | ||
- git | ||
- git-cvsserver | ||
- gitk | ||
- git-receive-pack | ||
- git-shell | ||
- git-upload-archive | ||
- git-upload-pack | ||
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6 | ||
- name: Copy Git Variable To Redhat Client | ||
shell: ln -s -f {{ git_dir }}/git-{{ git_version }}/bin/{{ item }} /usr/bin/{{ item }} | ||
with_items: | ||
- git | ||
- git-cvsserver | ||
- gitk | ||
- git-receive-pack | ||
- git-shell | ||
- git-upload-archive | ||
- git-upload-pack | ||
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: install.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,2 @@ | ||
git_version: 2.0.0 | ||
git_dir: /usr/local |