Description
I propose defaults/main.yml
shall have the possibility to express search config - similarly to how it already expresses bucket types (in riak_bucket_types
) - with a section like this:
#riak_search_schemas:
# - { name: myschema1, file: '/etc/mycustomschema' }
riak_search_schemas: []
#riak_search_indexes:
# - { name: myidx1, schema: 'myschema1' }
# - { name: myidx2, schema: 'myschema1' }
# - { name: myidx3, schema: '_yz_default' }
riak_search_indexes: []
Q1. Would it fit in ansible-riak?
Q2. I understand it shall be implemented using PUT requests 1 and 2. Do you have any advice on how to invoke those PUT requests idempotently? The two PUT requests are documented to return 409 if same name is already present - but it would not check if attributes are the same of the request (i.e. if the schema content is the expected one, and if the index is using the correct schema). It would require caller to issue GET first, store body, compare with the expected one, and then err if found but different. But such logic looks complex. Would you accept ignore_errors: true
like in 44da67f ?