mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2024-11-30 23:55:23 +01:00
3746f08f2f
Some Unix variants name GID 0 "wheel". Unfortunately, one cannot specify this group by ID, because Python conflates integer 0 with boolean False, nor can one specify this group using the string '0', because of assumptions in the Salt or Python codebases regarding group names.
26 lines
714 B
Plaintext
26 lines
714 B
Plaintext
{%- from "salt/map.jinja" import salt_settings with context %}
|
|
|
|
{%- set gitfs_keys=salt['pillar.get']('salt:gitfs:keys', {}) %}
|
|
|
|
{%- 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 %}
|
|
- mode: 600
|
|
- makedirs: True
|
|
- defaults:
|
|
key: {{ key }}
|
|
type: {{ type }}
|
|
{%- endfor %}
|
|
{%- endfor %}
|