Skip to content

Instantly share code, notes, and snippets.

@youcune
Last active August 29, 2015 14:05
Show Gist options
  • Save youcune/9172f738344508ed33d9 to your computer and use it in GitHub Desktop.
Save youcune/9172f738344508ed33d9 to your computer and use it in GitHub Desktop.
Ansible で CentOS に Git 2.1 を入れてみた
---
- name: yum erase perl-Git
yum: name=perl-Git state=absent
- name: yum install dependencies
yum: name={{item}}
with_items:
- curl-devel
- expat-devel
- gettext-devel
- openssl-devel
- zlib-devel
- perl-ExtUtils-MakeMaker
- name: make git
shell: >-
wget https://github.com/git/git/archive/v2.1.0.tar.gz &&
tar zxvf v2.1.0.tar.gz &&
rm -f v2.1.0.tar.gz &&
cd git-2.1.0 &&
make prefix=/usr/local all
chdir=/usr/local/src creates=/usr/local/bin/git
async: 900
- name: make install git
shell: >-
make prefix=/usr/local install
chdir=/usr/local/src/git-2.1.0 creates=/usr/local/bin/git
async: 900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment