Skip to content

Commit

Permalink
docs(yaml): os*.yaml map files needs at least an empty dict
Browse files Browse the repository at this point in the history
  • Loading branch information
daks committed Feb 27, 2019
1 parent 6a4e25a commit dd99750
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions template/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{#- Get the `topdir` from `tpldir` #}
{%- set topdir = tpldir.split('/')[0] %}
{#- Start imports as #}
{%- import_yaml topdir ~ "/defaults.yaml" as default_settings %}
{%- import_yaml topdir ~ "/osfamilymap.yaml" as osfamilymap %}
{%- import_yaml topdir ~ "/osmap.yaml" as osmap %}
{%- import_yaml topdir ~ "/osfingermap.yaml" as osfingermap %}
{%- import_yaml topdir ~ "/defaults.yaml" or {} as default_settings %}
{%- import_yaml topdir ~ "/osfamilymap.yaml" or {} as osfamilymap %}
{%- import_yaml topdir ~ "/osmap.yaml" or {} as osmap %}
{%- import_yaml topdir ~ "/osfingermap.yaml" or {} as osfingermap %}

{% set defaults = salt['grains.filter_by'](default_settings,
default='template',
Expand Down
4 changes: 3 additions & 1 deletion template/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# You just need to add the key:values for an `os_family` that differ
# from `defaults.yaml`.
# Only add an `os_family` which is/will be supported by the formula
# (empty `os_family`s do not need to be listed, just added here as an example).
#
# This file can be safely removed if you do not need to provide defaults via
# the `os_family` grain.
---
Debian:
pkg: template-debian
Expand Down
4 changes: 3 additions & 1 deletion template/osfingermap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# You just need to add the key:values for an `osfinger` that differ
# from `defaults.yaml` + `os_family.yaml` + `osmap.yaml`.
# Only add an `osfinger` which is/will be supported by the formula
# (empty `osfinger`s do not need to be listed, just added here as an example).
#
# This file can be safely removed if you do not need to provide defaults via
# the `os_finger` grain.
---
# os: Ubuntu
Ubuntu-18.04:
Expand Down
4 changes: 3 additions & 1 deletion template/osmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# You just need to add the key:values for an `os` that differ
# from `defaults.yaml` + `os_family.yaml`.
# Only add an `os` which is/will be supported by the formula
# (empty `os`es do not need to be listed, just added here as an example).
#
# This file can be safely removed if you do not need to provide defaults via
# the `os` grain.
---
# os_family: Debian
Ubuntu:
Expand Down

0 comments on commit dd99750

Please sign in to comment.