-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from myii/PR_map-and-yaml
Fix `map.jinja` and add more OSes
- Loading branch information
Showing
5 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# should contain the currently released version of the formula | ||
0.1.0 | ||
0.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=jinja | ||
|
||
{## Start imports as ##} | ||
{## Start imports as ##} | ||
{% import_yaml 'template/defaults.yaml' as defaults %} | ||
{% import_yaml 'template/osfamilymap.yaml' ad osfamilymap %} | ||
{% import_yaml 'template/osmap.yaml' ad osmap %} | ||
{% import_yaml 'template/osfamilymap.yaml' as osfamilymap %} | ||
{% import_yaml 'template/osmap.yaml' as osmap %} | ||
|
||
{## merge the osfamilymap ##} | ||
{% set osfamily = salt['grains.filter_by']('osfamilymap', grain='os_family_map') or{} %} | ||
{## Merge the osfamilymap ##} | ||
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or {} %} | ||
{% do salt['defaults.merge'](defaults['template'], osfamily) %} | ||
|
||
{## merge the osmap ##} | ||
{% set osmap = salt['grains.filter_by']('osmap', grain='os') or{} %} | ||
{% do salt['defaults.merge'](defaults['template'], osmap) %} | ||
{## Merge the osmap ##} | ||
{% set os = salt['grains.filter_by'](osmap, grain='os') or {} %} | ||
{% do salt['defaults.merge'](defaults['template'], os) %} | ||
|
||
{## merge the lookup ##} | ||
{% lookup = salt['pillar.get']('template:lookup', default={}, merge=True) %} | ||
{## Merge the lookup ##} | ||
{% set lookup = salt['pillar.get']('template:lookup', default={}) %} | ||
{% do salt['defaults.merge'](defaults['template'], lookup) %} | ||
|
||
{## merge the template pillar ##} | ||
{## Merge the template pillar ##} | ||
{% set template = salt['pillar.get']('template', default=defaults['template'], merge=True) %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
# | ||
# Setup variables using grains['os'] based logic. | ||
# 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). | ||
--- | ||
Ubuntu: | ||
pkg: template-ubuntu | ||
config: /etc/template.d/custom-ubuntu.conf | ||
|
||
Fedora: | ||
pkg: template-fedora | ||
service: | ||
name: service-fedora | ||
|
||
Ubuntu: | ||
pkg: template-ubuntu | ||
Raspbian: {} | ||
|
||
SmartOS: {} |