Commit ec410ce3 authored by Thorstein Buind Nordby's avatar Thorstein Buind Nordby
Browse files

work

parent bb064b6e
......@@ -17,4 +17,16 @@ awx_awx_password: password # Admin password for logging in to AWX (you'll want t
awx_postgres_password: password # Password for postgres database (you'll want to encrypt this)
awx_rabbitmq_password: password # Password for rabbitmq (you'll want to encrypt this)
awx_docker_registry: "" # If not using official docker registry, insert registry here
\ No newline at end of file
awx_docker_registry: "" # If not using official docker registry, insert registry here
#Package related settings
setup_epel: true #set to fale if setting up epel from other places than official yum !# REMOVE THIS AND PUT EPEL AS A REQUIREMENT
awx_required_pip_dependencies: # Required pip packages
- pyOpenSSL
- docker
- docker-compose
- ansible-tower-cli
- zipp
\ No newline at end of file
galaxy_info:
author: your name
description: your description
company: your company (optional)
author: thorsteinbn
description: Ansible role for setup awx with local docker
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
......@@ -16,7 +15,7 @@ galaxy_info:
# - CC-BY
license: license (GPLv2, CC-BY, etc)
min_ansible_version: 1.2
min_ansible_version: 2.5
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
......@@ -43,7 +42,11 @@ galaxy_info:
# - 1.0
# - 7
# - 99.99
platforms:
- name: Centos
versions:
- 7
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
......
......@@ -2,12 +2,16 @@
- name: Set dockerhub base with local registry
set_fact:
awx_docker_registry_ansible_base: "{{ awx_docker_registry }}/ansible"
when: awx_docker_registry =! ""
when: awx_docker_registry != ""
- name: Run AWX playbook from source with local registry
command: "ansible-playbook -i inventory install.yml -e postgres_data_dir={{ awx_postgres_data_dir }} -e dockerhub_base={{ awx_docker_registry_ansible_base }}"
when: awx_docker_registry =! ""
args:
chdir: "{{ awx_repo_dir }}/installer"
when: awx_docker_registry != ""
- name: Run AWX playbook from source whith official registry
command: "ansible-playbook -i inventory install.yml -e postgres_data_dir={{ awx_postgres_data_dir }}"
args:
chdir: "{{ awx_repo_dir }}/installer"
when: awx_docker_registry == ""
\ No newline at end of file
......@@ -29,7 +29,6 @@
path: "{{ awx_web_ssl_cert_folder }}/{{ inventory_hostname }}.crt"
privatekey_path: "{{ awx_web_ssl_key_folder }}/{{ inventory_hostname }}.key"
csr_path: "{{ awx_web_ssl_cert_folder }}/csr/{{ inventory_hostname }}.csr"
selfsigned_not_after: "+3650d"
provider: selfsigned
notify: Make pem from self-signed
......
......@@ -3,11 +3,25 @@
- name: Include variables for target OS
include_vars: '{{ ansible_os_family }}.yml'
- name: Enable epel
package:
name: epel-release
state: present
when:
- setup_epel
- ansible_os_family == "RedHat"
- name: Install requirements for target OS
package:
name: '{{ item }}'
state: present
loop: '{{ awx_package_requirements|flatten(levels=1) }}'
loop: '{{ awx_package_dependencies|flatten(levels=1) }}'
- name: Install required pip packages
pip:
name: '{{ item }}'
state: present
loop: '{{ awx_required_pip_dependencies|flatten(levels=1) }}'
- name: Clone AWX into configured directory.
git:
......@@ -21,6 +35,14 @@
- name: Setup passwords
include: awx-set-passwords.yml
- name: Set AWX compose dir
lineinfile:
path: "{{ awx_repo_dir }}/installer/inventory"
state: present
regexp: "^docker_compose_dir="
line: "docker_compose_dir={{ awx_compose_dir }}"
when: awx_compose_dir is defined
- name: Setup self-signed certs
include: awx-self-signed-cert.yml
when:
......
......@@ -2,4 +2,8 @@ awx_package_dependencies:
- '@Development tools'
- gettext
- gcc-c++
- bzip2
\ No newline at end of file
- bzip2
- python-devel
- python-pip
- ansible
- docker
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment