]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph_key: support using different keyring
authorGuillaume Abrioux <gabrioux@redhat.com>
Sat, 3 Oct 2020 04:56:06 +0000 (06:56 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 1 Dec 2020 14:53:26 +0000 (09:53 -0500)
commit18b34a5befa8cee55de29829dd9001c2cec127d3
treedddc6ba983effec02b566e67495bf28120f04aa0
parent63aa1950d93f150362e41f5989d3a464ad73ce4b
ceph_key: support using different keyring

Currently the `ceph_key` module doesn't support using a different
keyring than `client.admin`.
This commit adds the possibility to use a different keyring.

Usage:
```
      ceph_key:
        name: "client.rgw.myrgw-node.rgw123"
        cluster: "ceph"
        user: "client.bootstrap-rgw"
        user_key: /var/lib/ceph/bootstrap-rgw/ceph.keyring
        dest: "/var/lib/ceph/radosgw/ceph-rgw.myrgw-node.rgw123/keyring"
        caps:
          osd: 'allow rwx'
          mon: 'allow rw'
          import_key: False
        owner: "ceph"
        group: "ceph"
        mode: "0400"
```

Where:
`user` corresponds to `-n (--name)`
`user_key` corresponds to `-k (--keyring)`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 12e6260266dec04b4b2d25f3508aa7149fd16714)
library/ceph_key.py
tests/library/test_ceph_key.py