Last active
April 27, 2016 15:29
-
-
Save corburn/1ebaaf53c7abd8be282f to your computer and use it in GitHub Desktop.
Install Ansible
This file contains hidden or 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
.PHONY: ansible | |
ansible: | |
command -v ansible || make ${HOME}/workspace/src/github.com/ansible/ansible/build | |
.PHONY: ansible-build-dependencies | |
ansible-build-dependencies: enable-epel | |
yum update \ | |
&& yum -y groupinstall "Development tools" \ | |
&& yum -y install python-{pip,setuptools,devel} | |
.PHONY: enable-epel | |
enable-epel: | |
yum repolist | grep "Extra Packages for Enterprise Linux" || { \ | |
command -v curl || { yum update && yum -y install curl; }; \ | |
curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ | |
&& rpm -ivh epel-release-latest-7.noarch.rpm \ | |
&& rm epel-release-latest-7.noarch.rpm; \ | |
} | |
${HOME}/workspace/src/github.com/ansible/ansible: | |
git clone --recursive https://github.com/ansible/ansible.git $@ | |
${HOME}/workspace/src/github.com/ansible/ansible/build: ${HOME}/workspace/src/github.com/ansible/ansible ansible-build-dependencies | |
cd $< \ | |
&& $(MAKE) | |
@echo 'echo "source ~/workspace/src/github.com/ansible/ansible/hacking/env-setup" >> ~/.bash_profile' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment