]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
backup-and-restore: fix check on 'mode' variable
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 29 Jun 2022 06:40:13 +0000 (08:40 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 29 Jun 2022 06:47:54 +0000 (08:47 +0200)
Typical failure:

```
fatal: [localhost]: FAILED! =>
  msg: |-
    The conditional check 'mode not in ['backup', 'restore']' failed. The error was: error while evaluating conditional (mode not in ['backup', 'restore']): 'mode' is undefined
```

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2051640
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/backup-and-restore-ceph-files.yml

index 93f8143bef74abf005745d78c5ad4a3d7c26ae00..a01d0e88abf063d3f4ea6604b8dab034d71e2a7e 100644 (file)
@@ -42,7 +42,7 @@
           "you must pass the mode: -e mode=<backup|restore>"
       when:
         - mode is not defined
-        - mode not in ['backup', 'restore']
+          or mode not in ['backup', 'restore']
 
     - name: gather facts on source node
       setup: