62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
---
|
|
# Conditional facts to be set which are common to undercloud and overcloud
|
|
- name: set docker_registry_namespace_used
|
|
set_fact:
|
|
docker_registry_namespace_used: "{{ docker_registry_namespace }}"
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- when: get_build_command is defined
|
|
block:
|
|
- name: execute build_command
|
|
shell: "echo {{ get_build_command }}"
|
|
register: build_command_output
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- name: set container_build_id from get_build_command
|
|
set_fact:
|
|
container_build_id: "{{ build_command_output.stdout }}"
|
|
cacheable: true
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- name: set mixed upgrade container_build_id
|
|
set_fact:
|
|
container_build_id: "{{ overcloud_docker_image_tag }}"
|
|
docker_registry_namespace_used: "{{ overcloud_docker_registry_namespace }}"
|
|
cacheable: true
|
|
when:
|
|
- container_build_id is not defined
|
|
- use_overcloud_mixed_upgrade|default(false)|bool
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- name: set container_build_id from docker_image_tag
|
|
set_fact:
|
|
container_build_id: "{{ docker_image_tag }}"
|
|
cacheable: true
|
|
when: container_build_id is not defined
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- name: Set update_containers_append_tag for the play
|
|
set_fact:
|
|
update_containers_append_tag: "{{ lookup('pipe','date +-updated-%Y%m%d%H%M%S') }}"
|
|
cacheable: true
|
|
when: update_containers is defined and update_containers|bool and update_containers_append_tag is undefined
|
|
tags:
|
|
- undercloud-install
|
|
|
|
- name: Finally set container_build_id when it's not set by the above
|
|
set_fact:
|
|
container_build_id: "{{ dlrn_hash_tag }}"
|
|
cacheable: true
|
|
when: container_build_id is not defined
|
|
|
|
- name: echo container_build_id
|
|
debug:
|
|
var: container_build_id
|
|
tags:
|
|
- undercloud-install
|