validate: fix credentials validation

This task is failing when `ceph_docker_registry_auth` is enabled and
`ceph_docker_registry_username` is undefined with an ansible error
instead of the expected message.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1763139

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit da4215e9c0)
pull/4649/head
Guillaume Abrioux 2019-10-21 17:09:31 +02:00 committed by Dimitri Savineau
parent 4a5d3c3c2d
commit 4bf8cbe0c8
1 changed files with 2 additions and 2 deletions

View File

@ -205,5 +205,5 @@
msg: 'ceph_docker_registry_username and/or ceph_docker_registry_password variables need to be set'
when:
- ceph_docker_registry_auth | bool
- (ceph_docker_registry_username is not defined or ceph_docker_registry_password is not defined)
- (ceph_docker_registry_username | length == 0 or ceph_docker_registry_password | length == 0)
- (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)