]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
library: Add radosgw_caps to manage capabilities
authorMathias Chapelain <mathias.chapelain@proton.ch>
Tue, 18 Jan 2022 15:04:16 +0000 (16:04 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 17 Feb 2022 08:27:54 +0000 (09:27 +0100)
commit471bab902f614ca8fdae32b858730e5b7b9f1fb4
tree04c8332caa6a068e1cae29f7d142594adb7a61e4
parentd6937a22fadc1f92fa18e256c292f1545766a5db
library: Add radosgw_caps to manage capabilities

This commit add `radosgw_caps` module to be able to manage RadosGW users
capabilities.

Usage from module's documentation:
```YAML
- name: add users read write and all buckets capabilities
  radosgw_caps:
    name: foo
    state: present
    caps:
      - users=read,write
      - buckets=*
- name: remove usage write capabilities
  radosgw_caps:
    name: foo
    state: absent
    caps:
      - usage=write
```

This module support check mode by simulating the original `radosgw-admin`
behavior when adding capabilities.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit 65003f4ff90413094d46b682b78f6d749fcc2747)
library/radosgw_caps.py [new file with mode: 0644]