Last active
August 29, 2015 14:05
-
-
Save include/1dcc716a5989fff3e910 to your computer and use it in GitHub Desktop.
setup ansible plus tower
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
- hosts: ansible | |
sudo: yes | |
roles: | |
- { role: include.amzn-base } | |
vars: | |
ansible_version: 1.7.1 | |
ansible_tower_version: 2.0.0 | |
ansible_pkgs: | |
- python-pip | |
- python-paramiko | |
- PyYAML | |
- python-jinja2 | |
- python-httplib2 | |
- python-pyasn1 | |
- rpm-build | |
- make | |
- python2-devel | |
ansible_epel_pkgs: | |
- python-crypto2.6 | |
- python-keyczar | |
- sshpass | |
tasks: | |
- name: install ansible packages | |
yum: pkg={{ item }} state=latest | |
with_items: ansible_pkgs | |
tags: pkgs | |
- name: install ansible epel packages | |
yum: pkg={{ item }} enablerepo=epel state=latest | |
with_items: ansible_epel_pkgs | |
tags: | |
- pkgs | |
- epelpkgs | |
- name: clone ansible git repo | |
git: repo=https://github.com/ansible/ansible.git | |
dest=/opt/ansible-{{ ansible_version }} | |
version=release{{ ansible_version }} | |
tags: gitclone | |
- name: link /opt/ansible to /opt/ansible-{{ansible_version }} | |
file: src=/opt/ansible-{{ ansible_version}} dest=/opt/ansible state=link | |
tags: link | |
- name: upload and extract pre-fetched tower to remote host | |
unarchive: src=~/Downloads/ansible-tower-setup-latest.gz dest=/opt | |
tags: extract | |
- name: build rpm | |
command: chdir=/opt/ansible make rpm | |
tags: rpm | |
- name: install rpm | |
command: chdir=/opt/ansible rpm -Uvh rpm-build/ansible-{{ ansible_version }}*.noarch.rpm | |
tags: rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment