Skip to content

Instantly share code, notes, and snippets.

@blast-hardcheese
Created April 5, 2016 07:22
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 blast-hardcheese/ec8612a602f1cfa07f0aa7ec2b954884 to your computer and use it in GitHub Desktop.
Save blast-hardcheese/ec8612a602f1cfa07f0aa7ec2b954884 to your computer and use it in GitHub Desktop.
{% from 'java/map.jinja' import java with context %}
{% import_yaml 'gocd/defaults.yaml' as default_settings %}
{% set java_env = salt['pillar.get']('java:env', default='jre7') %}
{% do gocd.update({
'server': (gocd.get('server')|default({})).update({
'JAVA_HOME': java[java_env].home
}),
'agent': (gocd.get('agent')|default({})).update({
'JAVA_HOME': java[java_env].home
})
}) %}
# Downside of this is the default values are dict, not OrderedDict-- dot notation does not work with plain dicts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment