0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2024-12-27 08:53:34 +01:00
salt-formula/salt/gitfs/keys.sls

26 lines
714 B
Plaintext
Raw Normal View History

2016-04-19 18:51:17 +02:00
{%- from "salt/map.jinja" import salt_settings with context %}
{%- set gitfs_keys=salt['pillar.get']('salt:gitfs:keys', {}) %}
2016-04-19 18:51:17 +02:00
{%- for key, keyvalues in gitfs_keys.items() %}
{%- for type, keydata in keyvalues.items() %}
gitfs-key-{{ key }}-{{ type }}:
file.managed:
- name: {{ salt_settings.config_path }}/pki/gitfs/{{ key }}.{{ type }}
- source: salt://salt/files/gitfs_key.jinja
- template: jinja
- user: root
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
root
{%- endif %}
2016-04-19 18:51:17 +02:00
- mode: 600
- makedirs: True
- defaults:
key: {{ key }}
type: {{ type }}
{%- endfor %}
{%- endfor %}