]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
client: add a default value for keyring file
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 7 Jun 2018 13:49:03 +0000 (15:49 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 7 Jun 2018 15:26:35 +0000 (17:26 +0200)
commit8a653cacd56553926126d0b43d328af94bbd0337
treef5a88d1eaefdf0b43dec1e21e15079a53501bf6f
parent5eacc8f8d8ce20fc187471a79543bbfb02388031
client: add a default value for keyring file

Potential error if someone doesnt pass the mode in `keys` dict for
client nodes:

```
fatal: [client2]: FAILED! => {}

MSG:

The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'mode'

The error appears to have been in '/home/guits/ceph-ansible/roles/ceph-client/tasks/create_users_keys.yml': line 117, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: get client cephx keys
  ^ here

exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: 'dict object' has no attribute 'mode'

```

adding a default value will avoid the deployment failing for this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-client/tasks/create_users_keys.yml