]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: fix bug when using vault
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 10 Nov 2021 13:32:26 +0000 (14:32 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 29 Nov 2021 12:40:59 +0000 (13:40 +0100)
since a variable encrypted with vault is no longer a string but a
encrypted object we can't use the filter | length, we have to convert it
to a string before.

Fixes: #6991
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6ad7e5286920fceff6f4483672cbdca44f06a25f)

roles/ceph-validate/tasks/main.yml

index ccbbdfe2853fa209cff1c281ab63b4aba15fdf44..47233f588ee6a1a15ec4161b596e3d803b1f4110 100644 (file)
   when:
     - ceph_docker_registry_auth | bool
     - (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 | string | length == 0 or ceph_docker_registry_password | string | length == 0)
 
 - name: validate container service and container package
   fail: