Fix unless condition for ceph-deploy

In case of using an array parameter in Exec {unless}, it will run only if all
commands are false. However, we need to execute it if any of conditional
commands is false.

Change-Id: I002c734ffdbd6e6f69ff83c5f98e503e09503356
Closes-bug: #1565703
(cherry picked from commit f95c6344dc)
This commit is contained in:
Kyrylo Galanov 2016-04-04 14:42:00 +02:00
parent f173a6a995
commit ca1a40464c

View File

@ -30,9 +30,9 @@ class ceph::mon (
exec {'ceph-deploy gatherkeys':
command => "ceph-deploy gatherkeys ${node_hostname}",
unless => ['test -f /root/ceph.bootstrap-mds.keyring',
'test -f /root/ceph.bootstrap-osd.keyring',
'test -f /root/ceph.client.admin.keyring',
unless => ['test -f /root/ceph.bootstrap-mds.keyring \
-a -f /root/ceph.bootstrap-osd.keyring \
-a -f /root/ceph.client.admin.keyring',
],
try_sleep => 5,
tries => 6,