34 lines
1.8 KiB
YAML
34 lines
1.8 KiB
YAML
---
|
|
# tasks file for tripleo_container_image_push
|
|
- name: Setup container image push facts
|
|
set_fact:
|
|
_push_cmd: >-
|
|
{{ openstack_bin }} tripleo container image push
|
|
{{ tripleo_container_image_push_local | ternary('--local', '') }}
|
|
{{ tripleo_container_image_push_username | ternary('--username $TRIPLEO_IMAGE_PUSH_USERNAME', '') }}
|
|
{{ tripleo_container_image_push_password | ternary('--password $TRIPLEO_IMAGE_PUSH_PASSWORD', '') }}
|
|
{{ tripleo_container_image_push_registry_url | ternary('--registry-url $TRIPLEO_IMAGE_PUSH_REGISTRY_URL', '') }}
|
|
{{ tripleo_container_image_push_append_tag | ternary('--append-tag $TRIPLEO_IMAGE_PUSH_APPEND_TAG', '') }}
|
|
{{ tripleo_container_image_push_dry_run | ternary('--dry-run', '') }}
|
|
{{ tripleo_container_image_push_multi_arch | ternary('--multi-arch', '') }}
|
|
{{ tripleo_container_image_push_cleanup | ternary('--cleanup', '') }}
|
|
{{ tripleo_container_image_push_image }}
|
|
|
|
- name: Show the container image push command
|
|
debug:
|
|
var: _push_cmd
|
|
when: tripleo_container_image_push_debug|bool
|
|
|
|
- name: Container image push
|
|
shell: "{{ _push_cmd }}" # noqa 305
|
|
environment:
|
|
TRIPLEO_IMAGE_PUSH_APPEND_TAG: "{{ tripleo_container_image_push_append_tag | default('') }}"
|
|
TRIPLEO_IMAGE_PUSH_USERNAME: "{{ tripleo_container_image_push_username | default('') }}"
|
|
TRIPLEO_IMAGE_PUSH_PASSWORD: "{{ tripleo_container_image_push_password | default('') }}"
|
|
TRIPLEO_IMAGE_PUSH_REGISTRY_URL: "{{ tripleo_container_image_push_registry_url | default('') }}"
|
|
async: "{{ tripleo_container_image_push_timeout }}"
|
|
poll: 1
|
|
become: "{{ tripleo_container_image_push_become }}"
|
|
register: tripleo_container_image_push_result
|
|
changed_when: not tripleo_container_image_push_dry_run|bool
|