blob: 6ec9e3edde7787280632c77f4f9a0d3b7ca0bf44 [file] [log] [blame]
{%- for node_name, node_grains in salt['mine.get']('ceph:common:keyring:admin', 'grains.items', 'pillar').iteritems() %}
{%- if node_grains.ceph is defined and node_grains.ceph.ceph_keyring is defined %}
{%- for name, keyring in node_grains.ceph.get("ceph_keyring", {}).iteritems() %}
{%- if name == 'admin' %}
[client.{{ name }}]
key = {{ keyring.key }}
{%- for cap_name, cap in keyring.caps.iteritems() %}
caps {{ cap_name }} = "{{ cap }}"
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}