From 8120628e5a4f913e770851c1a3172126d79695fc Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 17 Feb 2015 16:41:48 -0500 Subject: ansible tower install --- playbooks/aws/ansible-tower/config.yml | 1 + playbooks/aws/ansible-tower/launch.yml | 2 +- roles/ansible_tower/files/inventory | 5 ++++ roles/ansible_tower/files/tower_setup_conf.yml | 10 +++++++ roles/ansible_tower/tasks/main.yaml | 38 ++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 roles/ansible_tower/files/inventory create mode 100644 roles/ansible_tower/files/tower_setup_conf.yml create mode 100644 roles/ansible_tower/tasks/main.yaml 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 + -- cgit v1.2.3