summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/aws/ansible-tower/config.yml1
-rw-r--r--playbooks/aws/ansible-tower/launch.yml2
-rw-r--r--roles/ansible_tower/files/inventory5
-rw-r--r--roles/ansible_tower/files/tower_setup_conf.yml10
-rw-r--r--roles/ansible_tower/tasks/main.yaml38
5 files changed, 55 insertions, 1 deletions
diff --git a/playbooks/aws/ansible-tower/config.yml b/playbooks/aws/ansible-tower/config.yml
index 069a7b7b1..33c331222 100644
--- a/playbooks/aws/ansible-tower/config.yml
+++ b/playbooks/aws/ansible-tower/config.yml
@@ -19,3 +19,4 @@
- ../../../roles/base_os
- ../../../roles/ipv6_disable
- ../../../roles/ansible_install
+ - ../../../roles/ansible_tower
diff --git a/playbooks/aws/ansible-tower/launch.yml b/playbooks/aws/ansible-tower/launch.yml
index b4b294a02..d2938f443 100644
--- a/playbooks/aws/ansible-tower/launch.yml
+++ b/playbooks/aws/ansible-tower/launch.yml
@@ -100,4 +100,4 @@
yum: name=* state=latest
# Apply the configs, seprate so that just the configs can be run by themselves
-#- include: config.yml
+- include: config.yml
diff --git a/roles/ansible_tower/files/inventory b/roles/ansible_tower/files/inventory
new file mode 100644
index 000000000..c4f03c7fb
--- /dev/null
+++ b/roles/ansible_tower/files/inventory
@@ -0,0 +1,5 @@
+[primary]
+localhost
+
+[all:children]
+primary
diff --git a/roles/ansible_tower/files/tower_setup_conf.yml b/roles/ansible_tower/files/tower_setup_conf.yml
new file mode 100644
index 000000000..023e6cd3e
--- /dev/null
+++ b/roles/ansible_tower/files/tower_setup_conf.yml
@@ -0,0 +1,10 @@
+admin_password: Wd97YLJkqt0Z
+database: external
+munin_password: Wd97YLJkqt0Z
+pg_database: tower
+pg_host: use-tower1.cx5dyo4uindu.us-east-1.rds.amazonaws.com
+pg_password: qG3JwuXb6uXi
+pg_port: 5432
+pg_username: tower_admin
+primary_machine: localhost
+redis_password: wbTneuaKu4YSLSmWqCYVQaB83bREadRg8HRvNJX4
diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml
new file mode 100644
index 000000000..ccdc5a486
--- /dev/null
+++ b/roles/ansible_tower/tasks/main.yaml
@@ -0,0 +1,38 @@
+---
+- name: install some useful packages
+ yum: name={{ item }}
+ with_items:
+ - git
+ - python-pip
+ - unzip
+ - python-psphere
+ - ansible
+ - telnet
+ - ack
+
+- name: download Tower setup
+ #get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-{{tower_version}}.tar.gz
+ get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-2.1.1.tar.gz
+ dest=/opt/ force=yes
+
+- name: extract Tower
+ unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no
+
+- name: copy tower_setup_conf.yml
+ copy: src=tower_setup_conf.yml dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644
+
+- name: copy inventory
+ copy: src=inventory dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644
+
+- name: run the Tower installer
+ command: chdir=/opt/ansible-tower-setup-2.1.1 creates=/etc/awx/settings.py ./setup.sh
+
+- name: Open firewalld port for http
+ firewalld: port=80/tcp permanent=true state=enabled
+
+- name: Open firewalld port for https
+ firewalld: port=443/tcp permanent=true state=enabled
+
+- name: Open firewalld port for https
+ firewalld: port=8080/tcp permanent=true state=enabled
+