Skip to content

Instantly share code, notes, and snippets.

@iganari
Last active May 29, 2018 15:51
Show Gist options
  • Save iganari/d176d7b59561a1b4b71c73e401eee9b8 to your computer and use it in GitHub Desktop.
Save iganari/d176d7b59561a1b4b71c73e401eee9b8 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
yum_update()
{
### upadte yum
yum update -y
### add epel reop
yum install -y epel-release
### add ius-release
rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/ius*.repo
### install python development tools
yum clean all -y
yum install --enablerepo=epel,ius -y python-devel openssl-devel gcc libffi-devel
yum install --enablerepo=epel,ius -y python-pip
}
install_ansible()
{
### install ansible in Python2
asb_ver='2.4.2.0'
pip install --upgrade pip
pip install ansible==${asb_ver}
}
### install ansible
yum_update
# install_ansible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment