mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Explicitly run image_build and image_push on localhost
This commit is contained in:
parent
ab6430e50d
commit
1033c4d251
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Build AWX Docker Images
|
||||
hosts: all
|
||||
hosts: localhost
|
||||
gather_facts: true
|
||||
roles:
|
||||
- {role: image_build}
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
- name: Verify awx-logos directory exists for official install
|
||||
stat:
|
||||
path: "../../awx-logos"
|
||||
delegate_to: localhost
|
||||
register: logosdir
|
||||
failed_when: logosdir.stat.isdir is not defined or not logosdir.stat.isdir
|
||||
when: awx_official|default(false)|bool
|
||||
@ -16,7 +15,6 @@
|
||||
copy:
|
||||
src: "../../awx-logos/awx/ui/client/assets/"
|
||||
dest: "../awx/ui_next/public/static/media/"
|
||||
delegate_to: localhost
|
||||
when: awx_official|default(false)|bool
|
||||
|
||||
- name: Set awx image name
|
||||
@ -27,16 +25,13 @@
|
||||
template:
|
||||
src: Dockerfile.j2
|
||||
dest: ../Dockerfile
|
||||
delegate_to: localhost
|
||||
|
||||
# Calling Docker directly because docker-py doesnt support BuildKit
|
||||
- name: Build AWX image
|
||||
command: docker build -t {{ awx_image }}:{{ awx_version }} ..
|
||||
delegate_to: localhost
|
||||
when: use_container_for_build|default(true)|bool
|
||||
|
||||
- name: Tag awx images as latest
|
||||
command: "docker tag {{ item }}:{{ awx_version }} {{ item }}:latest"
|
||||
delegate_to: localhost
|
||||
with_items:
|
||||
- "{{ awx_image }}"
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
password: "{{ docker_registry_password }}"
|
||||
reauthorize: true
|
||||
when: docker_registry is defined and docker_registry_password is defined
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Remove local images to ensure proper push behavior
|
||||
block:
|
||||
@ -15,7 +14,6 @@
|
||||
name: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ awx_image }}"
|
||||
tag: "{{ awx_version }}"
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Tag and Push Container Images
|
||||
block:
|
||||
@ -28,7 +26,6 @@
|
||||
with_items:
|
||||
- "latest"
|
||||
- "{{ awx_version }}"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Set full image path for Registry
|
||||
set_fact:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user