Multiple indices while defining a role using Elastic Search - Ansible role

Is there a way to add multiple indices while defining a role using ansible-elasticsearch role.
I tried doing this but in vain.

es_roles:
  native:
     indices:
       - names: 'index1, index2'
         privileges:
           - read

Though we can define the indices as shown below, I'm looking for a more clean solution as we've large number of indices.

es_roles:
  indices:
    - names: 'index1'
      privileges:
        - read
    - names: 'index2'
      privileges:
        - read

Dd you try this:

es_roles:
  native:
    indices:
      - names:
          - 'index1'
          - 'index2'
        privileges: 
          - read

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.