summaryrefslogtreecommitdiffstats
path: root/installer/roles/local_docker
diff options
context:
space:
mode:
Diffstat (limited to 'installer/roles/local_docker')
-rw-r--r--installer/roles/local_docker/defaults/main.yml1
-rw-r--r--installer/roles/local_docker/tasks/set_image.yml46
-rw-r--r--installer/roles/local_docker/templates/docker-compose.yml.j25
3 files changed, 15 insertions, 37 deletions
diff --git a/installer/roles/local_docker/defaults/main.yml b/installer/roles/local_docker/defaults/main.yml
index 96f7751bf1..490e1e8fcf 100644
--- a/installer/roles/local_docker/defaults/main.yml
+++ b/installer/roles/local_docker/defaults/main.yml
@@ -1,6 +1,7 @@
---
dockerhub_version: "{{ lookup('file', playbook_dir + '/../VERSION') }}"
+awx_image: "awx"
redis_image: "redis"
postgresql_version: "10"
diff --git a/installer/roles/local_docker/tasks/set_image.yml b/installer/roles/local_docker/tasks/set_image.yml
index 4442da1617..995214b651 100644
--- a/installer/roles/local_docker/tasks/set_image.yml
+++ b/installer/roles/local_docker/tasks/set_image.yml
@@ -1,19 +1,11 @@
---
- name: Manage AWX Container Images
block:
- - name: Export Docker web image if it isnt local and there isnt a registry defined
+ - name: Export Docker awx image if it isnt local and there isnt a registry defined
docker_image:
- name: "{{ web_image }}"
+ name: "{{ awx_image }}"
tag: "{{ awx_version }}"
- archive_path: "{{ awx_local_base_config_path|default('/tmp') }}/{{ web_image }}_{{ awx_version }}.tar"
- when: inventory_hostname != "localhost" and docker_registry is not defined
- delegate_to: localhost
-
- - name: Export Docker task image if it isnt local and there isnt a registry defined
- docker_image:
- name: "{{ task_image }}"
- tag: "{{ awx_version }}"
- archive_path: "{{ awx_local_base_config_path|default('/tmp') }}/{{ task_image }}_{{ awx_version }}.tar"
+ archive_path: "{{ awx_local_base_config_path|default('/tmp') }}/{{ awx_image }}_{{ awx_version }}.tar"
when: inventory_hostname != "localhost" and docker_registry is not defined
delegate_to: localhost
@@ -28,43 +20,27 @@
state: directory
when: ansible_connection != "local" and docker_registry is not defined
- - name: Copy web image to docker execution
+ - name: Copy awx image to docker execution
copy:
- src: "{{ awx_local_base_config_path|default('/tmp') }}/{{ web_image }}_{{ awx_version }}.tar"
- dest: "{{ docker_deploy_base_path }}/{{ web_image }}_{{ awx_version }}.tar"
- when: ansible_connection != "local" and docker_registry is not defined
-
- - name: Copy task image to docker execution
- copy:
- src: "{{ awx_local_base_config_path|default('/tmp') }}/{{ task_image }}_{{ awx_version }}.tar"
- dest: "{{ docker_deploy_base_path }}"
- when: ansible_connection != "local" and docker_registry is not defined
-
- - name: Load web image
- docker_image:
- name: "{{ web_image }}"
- tag: "{{ awx_version }}"
- load_path: "{{ docker_deploy_base_path }}/{{ web_image }}_{{ awx_version }}.tar"
- timeout: 300
+ src: "{{ awx_local_base_config_path|default('/tmp') }}/{{ awx_image }}_{{ awx_version }}.tar"
+ dest: "{{ docker_deploy_base_path }}/{{ awx_image }}_{{ awx_version }}.tar"
when: ansible_connection != "local" and docker_registry is not defined
- - name: Load task image
+ - name: Load awx image
docker_image:
- name: "{{ task_image }}"
+ name: "{{ awx_image }}"
tag: "{{ awx_version }}"
- load_path: "{{ docker_deploy_base_path }}/{{ task_image }}_{{ awx_version }}.tar"
+ load_path: "{{ docker_deploy_base_path }}/{{ awx_image }}_{{ awx_version }}.tar"
timeout: 300
when: ansible_connection != "local" and docker_registry is not defined
- name: Set full image path for local install
set_fact:
- awx_web_docker_actual_image: "{{ web_image }}:{{ awx_version }}"
- awx_task_docker_actual_image: "{{ task_image }}:{{ awx_version }}"
+ awx_docker_actual_image: "{{ awx_image }}:{{ awx_version }}"
when: docker_registry is not defined
when: dockerhub_base is not defined
- name: Set DockerHub Image Paths
set_fact:
- awx_web_docker_actual_image: "{{ dockerhub_base }}/awx_web:{{ dockerhub_version }}"
- awx_task_docker_actual_image: "{{ dockerhub_base }}/awx_task:{{ dockerhub_version }}"
+ awx_docker_actual_image: "{{ dockerhub_base }}/awx:{{ dockerhub_version }}"
when: dockerhub_base is defined
diff --git a/installer/roles/local_docker/templates/docker-compose.yml.j2 b/installer/roles/local_docker/templates/docker-compose.yml.j2
index 7a21aa2115..a6cf121593 100644
--- a/installer/roles/local_docker/templates/docker-compose.yml.j2
+++ b/installer/roles/local_docker/templates/docker-compose.yml.j2
@@ -3,7 +3,7 @@ version: '2'
services:
web:
- image: {{ awx_web_docker_actual_image }}
+ image: {{ awx_docker_actual_image }}
container_name: awx_web
depends_on:
- redis
@@ -72,7 +72,7 @@ services:
no_proxy: {{ no_proxy | default('') }}
task:
- image: {{ awx_task_docker_actual_image }}
+ image: {{ awx_docker_actual_image }}
container_name: awx_task
depends_on:
- redis
@@ -81,6 +81,7 @@ services:
{% if pg_hostname is not defined %}
- postgres
{% endif %}
+ command: /usr/bin/launch_awx_task.sh
hostname: {{ awx_task_hostname }}
user: root
restart: unless-stopped