-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
38 lines (38 loc) · 1.04 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- name: git
hosts: all
gather_facts: False
tasks:
- name: set is_amazon_ebs
set_fact:
is_amazon_ebs: "{{ build_type == 'amazon-ebs' }}"
- name: install packages
become: "{{ is_amazon_ebs }}"
yum: name={{ item }} state=present
with_items:
- gcc
- autoconf
- openssl-devel
- curl-devel
- expat-devel
- perl-ExtUtils-MakeMaker
- gettext
- name: clean yum cache
become: "{{ is_amazon_ebs }}"
command: yum clean all
- name: unarchive git tarball
unarchive:
src: https://github.com/git/git/archive/v{{ version }}.tar.gz
dest: .
remote_src: True
- name: install git
command: " {{ item }} chdir=git-{{ version }} "
with_items:
- autoconf
- ./configure --prefix=/tmp/usr --with-curl
- make install
- name: archive installed git dir
command: tar czf dest.tar.gz -C /tmp usr
- name: clean up git source dir
file:
path: git-{{ version }}
state: absent