-
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 #20 from aboe76/update_map.jinja
update formula with map.jinja and style guide references, improve REA…
- Loading branch information
Showing
10 changed files
with
100 additions
and
31 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
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 | ||
1.0.0 | ||
0.1.0 |
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,3 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
template: | ||
lookup: | ||
master: template-master | ||
|
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,5 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
template: | ||
pkg: template | ||
config: '/etc/template' | ||
|
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,33 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=jinja | ||
|
||
{## Start with defaults from defaults.yaml ##} | ||
{% import_yaml 'template/defaults.yaml' as default_settings %} | ||
{## Start imports as ##} | ||
{% import_yaml 'template/defaults.yaml' as defaults %} | ||
{% import_yaml 'template/osfamilymap.yaml' ad osfamilymap %} | ||
{% import_yaml 'template/osmap.yaml' ad osmap %} | ||
|
||
{## | ||
Setup variables using grains['os_family'] based logic, only add key:values | ||
that differ from what is in defaults.yaml | ||
##} | ||
{% set os_family_map = salt['grains.filter_by']({ | ||
'Debian': {}, | ||
'Suse': {}, | ||
'Arch': { | ||
"pkg" : 'template-arch', | ||
}, | ||
'RedHat': { | ||
"config": '/etc/template.conf', | ||
}, | ||
} | ||
, grain="os_family" | ||
, merge=salt['pillar.get']('template:lookup')) | ||
%} | ||
{## Merge the flavor_map to the default settings ##} | ||
{% do default_settings.template.update(os_family_map) %} | ||
{## merge the osfamilymap ##} | ||
{% set osfamily = salt['grains.filter_by']('osfamilymap', grain='os_family_map') or{} %} | ||
{% do salt['defaults.merge'](defaults['template'], osfamily) %} | ||
|
||
{## Merge in template:lookup pillar ##} | ||
{% set template = salt['pillar.get']( | ||
'template', | ||
default=default_settings.template, | ||
merge=True | ||
) | ||
%} | ||
{## merge the osmap ##} | ||
{% set osmap = salt['grains.filter_by']('osmap', grain='os') or{} %} | ||
{% do salt['defaults.merge'](defaults['template'], osmap) %} | ||
|
||
{## merge the lookup ##} | ||
{% lookup = salt['pillar.get']('template:lookup', default={}, merge=True) %} | ||
{% do salt['defaults.merge'](defaults['template'], lookup) %} | ||
|
||
{## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
# # vim: ft=yaml | ||
--- | ||
Debian: | ||
pkg: template-debian | ||
config: /etc/template.d/custom.conf | ||
|
||
RedHat: | ||
pkg: template-redhat | ||
config: /etc/template.conf | ||
|
||
Suse: | ||
pkg: template-suse | ||
|
||
Arch: | ||
pkg: template-arch | ||
|
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
Fedora: | ||
pkg: template-fedora | ||
|
||
Ubuntu: | ||
pkg: template-ubuntu |
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