Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
714B

  1. {%- from "salt/map.jinja" import salt_settings with context %}
  2. {%- set gitfs_keys=salt['pillar.get']('salt:gitfs:keys', {}) %}
  3. {%- for key, keyvalues in gitfs_keys.items() %}
  4. {%- for type, keydata in keyvalues.items() %}
  5. gitfs-key-{{ key }}-{{ type }}:
  6. file.managed:
  7. - name: {{ salt_settings.config_path }}/pki/gitfs/{{ key }}.{{ type }}
  8. - source: salt://salt/files/gitfs_key.jinja
  9. - template: jinja
  10. - user: root
  11. - group:
  12. {%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
  13. wheel
  14. {%- else %}
  15. root
  16. {%- endif %}
  17. - mode: 600
  18. - makedirs: True
  19. - defaults:
  20. key: {{ key }}
  21. type: {{ type }}
  22. {%- endfor %}
  23. {%- endfor %}