mirror of https://github.com/ceph/ceph-ansible.git
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
# This example playbook is used to add rgw users and buckets
|
|
#
|
|
# This example is run on your local machine
|
|
#
|
|
# Ensure that your local machine can connect to rgw of your cluster
|
|
#
|
|
# You will need to update the following vars
|
|
#
|
|
# rgw_host
|
|
# port
|
|
# admin_access_key
|
|
# admin_secret_key
|
|
#
|
|
# Additionally modify the users list and buckets list to create the
|
|
# users and buckets you want
|
|
#
|
|
- name: Add rgw users and buckets
|
|
connection: local
|
|
hosts: localhost
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Add rgw users and buckets
|
|
ceph_add_users_buckets:
|
|
rgw_host: '172.20.0.2'
|
|
port: 8000
|
|
admin_access_key: '8W56BITCSX27CD555Z5B'
|
|
admin_secret_key: 'JcrsUNDNPAvnAWHiBmwKOzMNreOIw2kJWAclQQ20'
|
|
users:
|
|
- username: 'test1'
|
|
fullname: 'tester'
|
|
email: 'dan1@email.com'
|
|
maxbucket: 666
|
|
suspend: false
|
|
autogenkey: false
|
|
accesskey: 'B3AR4Q33L59YV56A9A2F'
|
|
secretkey: 'd84BRnMysnVGSyZiRlYUMduVgIarQWiNMdKzrF76'
|
|
userquota: true
|
|
usermaxsize: '1000'
|
|
usermaxobjects: 3
|
|
bucketquota: true
|
|
bucketmaxsize: '1000'
|
|
bucketmaxobjects: 3
|
|
- username: 'test2'
|
|
fullname: 'tester'
|
|
buckets:
|
|
- bucket: 'bucket1'
|
|
user: 'test2'
|
|
- bucket: 'bucket2'
|
|
user: 'test1'
|
|
- bucket: 'bucket3'
|
|
user: 'test1'
|
|
- bucket: 'bucket4'
|
|
user: 'test1'
|
|
- bucket: 'bucket5'
|
|
user: 'test1'
|
|
- bucket: 'bucket6'
|
|
user: 'test2'
|
|
- bucket: 'bucket7'
|
|
user: 'test2'
|
|
- bucket: 'bucket8'
|
|
user: 'test2'
|
|
- bucket: 'bucket9'
|
|
user: 'test2'
|
|
- bucket: 'bucket10'
|
|
user: 'test2'
|