#!/bin/bash # # let's make an ansible rpm for offline deployment # yum makecache yum -y update # rpm build deps yum install -y epel-release yum install -y git python-jinja2 PyYAML asciidoc-doc python-sphinx rpm-build python2-devel # make build area mkdir -p /opt/software && cd /opt/software git clone git://github.com/ansible/ansible.git -b stable-2.3 --recursive # make rpm cd ansible make rpm # an rpm will be created in rpm-build # ex. rpm-build/ansible-2.3.0.0-100.git201703311850.f15e1f2.stable23.el7.centos.noarch.rpm # yum install -y rpm-build/ansible-2.3.0.0-100.git201703311850.f15e1f2.stable23.el7.centos.noarch.rpm