Skip to content

Commit

Permalink
feat(macos): basic package and group handling
Browse files Browse the repository at this point in the history
There is no 'root' group and no `user` and `group` grains either.
And the `/etc/template` directory needs to be created by state.
  • Loading branch information
noelmcloughlin committed May 31, 2019
1 parent 7da2867 commit 8c3fe22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions template/config/file.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ template-config-file-file-managed:
- mode: 644
- user: root
- group: {{ template.rootgroup }}
- makedirs: True
- template: jinja
- require:
- sls: {{ sls_package_install }}
Expand Down
7 changes: 6 additions & 1 deletion template/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
# you will need to provide at least an empty dict in this file, e.g.
# osfamilymap: {}
---
{%- if grains.os == 'MacOS' %}
{% set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- endif %}

Debian:
pkg: template-debian
config: /etc/template.d/custom.conf
Expand Down Expand Up @@ -40,4 +44,5 @@ Solaris: {}

Windows: {}

MacOS: {}
MacOS:
rootgroup: {{ rootgroup | d('') }}

0 comments on commit 8c3fe22

Please sign in to comment.