Remove image push logic from installer roles

I’m going to be reusing this code on the Tower side, and I’m trying to refactor some of the AWX specific bits out. There will probably be more to come, but this is a good start.
This commit is contained in:
Shane McDonald
2018-04-16 17:56:06 -04:00
parent 2b6fe7969f
commit 40d7751fbd
8 changed files with 74 additions and 77 deletions

View File

@@ -89,11 +89,11 @@
- name: Set awx_web image name
set_fact:
awx_web_image: "{{ awx_web_image|default('awx_web') }}"
web_image: "{{ web_image|default('awx_web') }}"
- name: Set awx_task image name
set_fact:
awx_task_image: "{{ awx_task_image|default('awx_task') }}"
task_image: "{{ task_image|default('awx_task') }}"
- name: Ensure directory exists
file:
@@ -195,7 +195,7 @@
no_proxy: "{{ no_proxy | default('') }}"
path: "{{ docker_base_path }}"
dockerfile: Dockerfile
name: "{{ awx_web_image }}"
name: "{{ web_image }}"
tag: "{{ awx_version }}"
delegate_to: localhost
@@ -207,11 +207,17 @@
no_proxy: "{{ no_proxy | default('') }}"
path: "{{ docker_base_path }}"
dockerfile: Dockerfile.task
name: "{{ awx_task_image }}"
name: "{{ task_image }}"
tag: "{{ awx_version }}"
pull: no
delegate_to: localhost
- name: Tag task and web images as latest
command: "docker tag {{ item }}:{{ awx_version }} {{ item }}:latest"
with_items:
- "{{ task_image }}"
- "{{ web_image }}"
- name: Clean docker base directory
file:
path: "{{ docker_base_path }}"

View File

@@ -1,4 +1,4 @@
FROM {{ awx_web_image }}:{{ awx_version }}
FROM {{ web_image }}:{{ awx_version }}
USER 0
RUN sudo yum -y remove nginx
USER 1000