Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

erp2445: use grains.filter_by in os.jinja2

  • Loading branch information...
Diep Pham
Diep Pham committed Mar 9, 2015
1 parent 775e09d commit 914baf59163597ca3b56c78538c32b4f7cc33e27
Showing with 15 additions and 12 deletions.
  1. +1 −1 nodejs/init.sls
  2. +10 −7 os.jinja2
  3. +1 −1 postgresql/absent.sls
  4. +1 −1 postgresql/init.sls
  5. +1 −1 rsyslog/absent.sls
  6. +1 −1 rsyslog/init.sls
@@ -3,7 +3,7 @@
include:
- apt

{%- import "os.jinja2" as os with context %}
{%- from "os.jinja2" import os with context %}
{%- if os.is_precise %}
{% set version = '0.10.32' %}
@@ -1,7 +1,10 @@
{%- set is_trusty = False %}
{%- set is_precise = False %}
{%- if grains["oscodename"] == "trusty" %}
{%- set is_trusty = True %}
{%- elif grains["oscodename"] == "precise" %}
{%- set is_precise = True %}
{%- endif %}
{% set os = salt["grains.filter_by"]({
"precise": {
"is_precise": True,
"is_trusty": False,
},
"trusty": {
"is_precise": False,
"is_trusty": True,
},
}, grain="oscodename", default="precise") %}
@@ -1,6 +1,6 @@
{#- Usage of this is governed by a license that can be found in doc/license.rst -#}

{%- import "os.jinja2" as os with context %}
{%- from "os.jinja2" import os with context %}
{%- if os.is_precise %}
/etc/apt/sources.list.d/postgresql.list:
@@ -7,7 +7,7 @@ include:
- ssl
{% endif %}

{%- import "os.jinja2" as os with context %}
{%- from "os.jinja2" import os with context %}
postgresql-dev:
{%- if os.is_precise %}
@@ -1,6 +1,6 @@
{#- Usage of this is governed by a license that can be found in doc/license.rst -#}

{% import "os.jinja2" as os with context %}
{%- from "os.jinja2" import os with context %}
rsyslog:
pkg:
- purged
@@ -3,7 +3,7 @@
include:
- apt

{% import "os.jinja2" as os with context %}
{%- from "os.jinja2" import os with context %}
{#- PID file owned by root, no need to manage #}
rsyslog:

0 comments on commit 914baf5

Please sign in to comment.
You can’t perform that action at this time.