Skip to content

Instantly share code, notes, and snippets.

Created March 11, 2015 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6edc341b7810d886444d to your computer and use it in GitHub Desktop.
Save anonymous/6edc341b7810d886444d to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# vim: ft=jinja
{##
This map.jinja pulls in
- defaults from defaults.sls
- ubuntu flavor related decisions
- merges in formula:ceph pillar
##}
{##
Populate the default_settings dictionary with the defaults for the
ceph formula.
##}
{% import_yaml 'formula/formulaname/defaults.yml' as default_settings %}
{##
Logic to update or add to default_setings based on precise/trusty
##}
{% set flavor_map = salt['grains.filter_by'](
{
'os1': { },
'os2': { },
},
grain='os')
%}
{##
Merge the flavor_map to the default settings
##}
{% do default_settings.ceph.update(flavor_map) %}
{##
Merge the default_settings variable into the pillar for ceph and
return as ceph_settings to be used in state files
##}
{% set ceph_settings = salt['pillar.get'](
'ceph',
default=default_settings.formulaname,
merge=True)
%}
formulaname:
opt: 1
opt2: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment