Skip to content

Commit

Permalink
Use a different group name for GID 0 depending on the minion's O/S
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xenophonf committed Jan 13, 2017
1 parent f58562b commit 3746f08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
14 changes: 12 additions & 2 deletions salt/cloud.sls
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ cloud-cert-{{ cert }}-pem:
- source: salt://{{ slspath }}/files/key
- template: jinja
- user: root
- group: root
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
root
{%- endif %}
- mode: 600
- makedirs: True
- defaults:
Expand Down Expand Up @@ -91,7 +96,12 @@ salt-cloud-providers-permissions:
file.directory:
- name: {{ salt_settings.config_path }}/cloud.providers.d
- user: root
- group: root
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
root
{%- endif %}
- file_mode: 600
- dir_mode: 700
- recurse:
Expand Down
7 changes: 6 additions & 1 deletion salt/gitfs/keys.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ gitfs-key-{{ key }}-{{ type }}:
- source: salt://salt/files/gitfs_key.jinja
- template: jinja
- user: root
- group: root
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
root
{%- endif %}
- mode: 600
- makedirs: True
- defaults:
Expand Down

0 comments on commit 3746f08

Please sign in to comment.