Merge "Modify RGW client format"

This commit is contained in:
Zuul 2024-01-08 19:32:38 +00:00 committed by Gerrit Code Review
commit 777019a386
2 changed files with 53 additions and 15 deletions

View File

@ -1,19 +1,23 @@
---
ceph_conf_overrides_rgw:
"client.rgw.{{ hostvars[inventory_hostname]['ansible_facts']['hostname'] }}.rgw0":
# OpenStack integration with Keystone
rgw_keystone_url: "{{ keystone_service_adminuri }}"
rgw_keystone_api_version: 3
rgw_keystone_admin_user: "{{ radosgw_admin_user }}"
rgw_keystone_admin_password: "{{ radosgw_admin_password }}"
rgw_keystone_admin_project: "{{ radosgw_admin_tenant }}"
rgw_keystone_admin_domain: default
rgw_keystone_accepted_roles: 'member, admin, swiftoperator'
rgw_keystone_implicit_tenants: 'true'
rgw_swift_account_in_url: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_enable_apis: 'swift, s3'
rgw_s3_auth_use_keystone: 'true'
ceph_conf_overrides_rgw: |-
{{
{
'client.rgw.' ~ hostvars[inventory_hostname]['ansible_facts']['hostname'] ~ '.rgw0': {
'rgw_keystone_url': keystone_service_adminuri,
'rgw_keystone_api_version': 3,
'rgw_keystone_admin_user': radosgw_admin_user,
'rgw_keystone_admin_password': radosgw_admin_password,
'rgw_keystone_admin_project': radosgw_admin_tenant,
'rgw_keystone_admin_domain': 'default',
'rgw_keystone_accepted_roles': 'member, admin, swiftoperator',
'rgw_keystone_implicit_tenants': 'true',
'rgw_swift_account_in_url': 'true',
'rgw_swift_versioning_enabled': 'true',
'rgw_enable_apis': 'swift, s3',
'rgw_s3_auth_use_keystone': 'true'
}
}
}}
###
### Backend TLS

View File

@ -0,0 +1,34 @@
---
issues:
- |
With recent changes to config_template module, it is not possible
anymore to have variables as dictionary keys in overrides. Example below
will not be renderred properly:
.. code-block:: yaml
config_overrides:
"{{ inventory_hostname }}":
cruel: world
This limitation boils down to Ansible design and will be true for any other
module as well.
In order to overcome it, you can transform the dictionary to a Jinja2 format:
.. code-block:: yaml
config_overrides: |-
{{
{
inventory_hostname: {
'cruel': 'world'
}
}
}}
fixes:
- |
Fixes format of ``ceph_conf_overrides_rgw`` variable by converting override
dictionary to Jinja2 format to workaround Ansible limitation on usage of
variables as keys in dictionary.