mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
ca247182df
This commit updates all files that weren't passing yamllint for them to pass. A new yamllint target has been added. One can run `tox -e yamllint` or `yamllint -s .` locally to ensure yaml files are still passing. This check will be enabled in the CI so it can get on every new contributions, and prevent merging non-compliant code. Signed-off-by: Yanis Guenane <yguenane@redhat.com>
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
---
|
|
- name: Authenticate with Docker registry if registry password given
|
|
docker_login:
|
|
registry: "{{ docker_registry }}"
|
|
username: "{{ docker_registry_username }}"
|
|
password: "{{ docker_registry_password | quote }}"
|
|
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:
|
|
- name: Remove web image
|
|
docker_image:
|
|
name: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ web_image }}"
|
|
tag: "{{ awx_version }}"
|
|
state: absent
|
|
|
|
- name: Remove task image
|
|
docker_image:
|
|
name: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ task_image }}"
|
|
tag: "{{ awx_version }}"
|
|
state: absent
|
|
delegate_to: localhost
|
|
|
|
- name: Tag and Push Container Images
|
|
block:
|
|
- name: Tag and push web image to registry
|
|
docker_image:
|
|
name: "{{ web_image }}"
|
|
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ web_image }}"
|
|
tag: "{{ item }}"
|
|
push: true
|
|
with_items:
|
|
- "latest"
|
|
- "{{ awx_version }}"
|
|
|
|
- name: Tag and push task image to registry
|
|
docker_image:
|
|
name: "{{ task_image }}"
|
|
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ task_image }}"
|
|
tag: "{{ item }}"
|
|
push: true
|
|
with_items:
|
|
- "latest"
|
|
- "{{ awx_version }}"
|
|
delegate_to: localhost
|
|
|
|
- name: Set full image path for Registry
|
|
set_fact:
|
|
awx_web_docker_actual_image: >-
|
|
{{ docker_registry }}/{{ docker_registry_repository }}/{{ web_image }}:{{ awx_version }}
|
|
awx_task_docker_actual_image: >-
|
|
{{ docker_registry }}/{{ docker_registry_repository }}/{{ task_image }}:{{ awx_version }}
|