cd /tmp
Download the latest Ansible Tower package
curl -O https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz
tar xvfz /tmp/ansible-tower-setup-latest.tar.gz
cd /tmp/ansible-tower-setup-*/
vi inventory
Fill a few variables out in an inventory file: admin_password, pg_password, rabbitmq_password
Example:
[tower]
localhost ansible_connection=local
[database]
[all:vars]
admin_password='<insert password>'
pg_host=''
pg_port=''
pg_database='awx'
pg_username='awx'
pg_password='<insert password>'
rabbitmq_port=5672
rabbitmq_vhost=tower
rabbitmq_username=tower
rabbitmq_password='<insert password>'
rabbitmq_cookie=cookiemonster
# Needs to be true for fqdns and ip addresses
rabbitmq_use_long_name=false
Run the Ansible Tower setup script
sudo ./setup.sh
cd /tmp
git clone https://github.com/ajacocks/dp.git
cd /tmp/dp
ansible-vault encrypt_string <ansible tower password>
New Vault password: <set vault password>
Confirm New Vault password: <set vault password>
ansible-vault encrypt_string <aws key>
New Vault password: <set vault password - same as above>
Confirm New Vault password: <confirm vault password>
ansible-vault encrypt_string <aws secret>
New Vault password: <set vault password - same as above>
Confirm New Vault password: <confirm vault password>
ansible-vault encrypt_string <default workshop password>
New Vault password: <set vault password - same as above>
Confirm New Vault password: <confirm vault password>
vi configure_tower.yml
Fill a few variables out in an inventory file: AWS_KEY, AWS_SECRET, tower_pass, workshop_password, org, domain_name Example:
---
- hosts: localhost
name: Configure Ansible Tower
connection: local
vars:
AWS_KEY: !vault |
$ANSIBLE_VAULT;1.1;AES256
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000
AWS_SECRET: !vault |
$ANSIBLE_VAULT;1.1;AES256
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000
tower_host: localhost
tower_user: admin
tower_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000
workshop_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000
org: "DreamPort"
domain_name: redhatgov.io
ansible-playbook configure_tower.yml --ask-vault