Skip to content

Commit

Permalink
ceph-container-engine: allow override container_package_name and cont…
Browse files Browse the repository at this point in the history
…ainer_service_name

Only include specific variables when they are undefined

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 95bce32)
  • Loading branch information
clwluvw authored and guits committed Sep 9, 2021
1 parent 0d670c7 commit e7b0af3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
with_first_found:
- "{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
- "{{ ansible_facts['os_family'] }}.yml"
when: container_package_name is undefined and container_service_name is undefined

- name: debian based systems tasks
include_tasks: debian_prerequisites.yml
Expand Down
7 changes: 7 additions & 0 deletions roles/ceph-validate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@
- (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)

- 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: check virtual_ips is defined
fail:
msg: "virtual_ips is not defined."
Expand Down

0 comments on commit e7b0af3

Please sign in to comment.