ceph-container-engine: allow override container_package_name and container_service_name

Only include specific variables when they are undefined

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 95bce32270)
pull/6873/head
Seena Fallah 2021-08-05 15:33:55 +04:30 committed by Guillaume Abrioux
parent feb0ba9dcc
commit 1626caaf6a
2 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,7 @@
with_first_found: with_first_found:
- "{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml" - "{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
- "{{ ansible_facts['os_family'] }}.yml" - "{{ ansible_facts['os_family'] }}.yml"
when: container_package_name is undefined and container_service_name is undefined
- name: debian based systems tasks - name: debian based systems tasks
include_tasks: debian_prerequisites.yml include_tasks: debian_prerequisites.yml

View File

@ -229,6 +229,13 @@
- (ceph_docker_registry_username is not defined or ceph_docker_registry_password is not defined) or - (ceph_docker_registry_username is not defined or ceph_docker_registry_password is not defined) or
(ceph_docker_registry_username | length == 0 or ceph_docker_registry_password | length == 0) (ceph_docker_registry_username | length == 0 or ceph_docker_registry_password | length == 0)
- name: validate container service and container package
fail:
msg: 'both container_package_name and container_service_name should be defined'
when:
- (container_package_name is undefined and container_service_name is defined) or
(container_package_name is defined and container_service_name is undefined)
- name: validate openstack_keys key format - name: validate openstack_keys key format
fail: fail:
msg: '{{ item.name }} key format invalid' msg: '{{ item.name }} key format invalid'