Last active
December 3, 2019 19:53
-
-
Save tlhakhan/42cf7fcc99775d3937f1f022b862d75f to your computer and use it in GitHub Desktop.
Ansible - Building RPM
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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment