Skip to content

Instantly share code, notes, and snippets.

@corburn
Last active April 27, 2016 15:29
Show Gist options
  • Save corburn/1ebaaf53c7abd8be282f to your computer and use it in GitHub Desktop.
Save corburn/1ebaaf53c7abd8be282f to your computer and use it in GitHub Desktop.
Install Ansible
.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