Skip to content

Instantly share code, notes, and snippets.

@silverskyvicto
Created June 23, 2019 09:24
Show Gist options
  • Save silverskyvicto/436db2a769fb73351d22a00dd075d39a to your computer and use it in GitHub Desktop.
Save silverskyvicto/436db2a769fb73351d22a00dd075d39a to your computer and use it in GitHub Desktop.
- name: Install git
hosts: {{server}}
become: yes
tasks:
- name: Install a list of development tool packages
yum:
name:
- gcc
- autoconf
state: present
- name: Install a list of dependency packages
yum:
name:
- curl-devel
- expat-devel
- gettext-devel
- openssl-devel
- perl-devel
- zlib-devel
state: present
- name: Unarchive a file that needs to be downloaded
unarchive:
src: https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.22.0.tar.gz
dest: /usr/local/src
remote_src: yes
- name: Run a configure file
command: ./configure --prefix=/usr
args:
chdir: "/usr/local/src/git-2.22.0"
- name: Build 'all'
make:
chdir: /usr/local/src/git-2.22.0
target: all
- name: Build 'install'
make:
chdir: /usr/local/src/git-2.22.0
target: install
- name: Delete git directory
file:
path: /usr/local/src/git-2.22.0
state: absent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment