From cb03e885d4ff0875d58f412c0f3ec2fa80a1ca2d Mon Sep 17 00:00:00 2001 From: Simon Lloyd Date: Sun, 11 Jan 2015 19:31:05 +0100 Subject: [PATCH] Fix: pkgs is undefined Update sls files to match name change in map.jinja. --- salt/cloud.sls | 6 +++--- salt/master.sls | 8 ++++---- salt/minion.sls | 8 ++++---- salt/ssh.sls | 6 +++--- salt/standalone.sls | 8 ++++---- salt/syndic.sls | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/salt/cloud.sls b/salt/cloud.sls index be62f5d..361df4d 100644 --- a/salt/cloud.sls +++ b/salt/cloud.sls @@ -1,5 +1,5 @@ -{% from "salt/map.jinja" import pkgs with context %} -{% set salt = pillar.get('salt', {}) -%} +{% from "salt/map.jinja" import salt with context %} +{% do salt.update(pillar.get('salt', {})) -%} {% set cloud = salt.get('cloud', {}) -%} python-pip: @@ -24,7 +24,7 @@ apache-libcloud: salt-cloud: pkg.installed: - - name: {{ pkgs['salt-cloud'] }} + - name: {{ salt['salt-cloud'] }} - require: - pip: apache-libcloud - pip: pycrypto diff --git a/salt/master.sls b/salt/master.sls index 2cb3bd0..8885a0a 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -1,16 +1,16 @@ -{% from "salt/map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import salt with context %} salt-master: pkg.installed: - - name: {{ pkgs['salt-master'] }} + - name: {{ salt['salt-master'] }} file.recurse: - - name: {{ pkgs.get('config-path', '/etc/salt') }}/master.d + - name: {{ salt.get('config-path', '/etc/salt') }}/master.d - template: jinja - source: salt://salt/files/master.d - clean: True service.running: - enable: True - - name: {{ pkgs.get('master-service', 'salt-master') }} + - name: {{ salt.get('master-service', 'salt-master') }} - watch: - pkg: salt-master - file: salt-master diff --git a/salt/minion.sls b/salt/minion.sls index a33172f..db4958b 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -1,10 +1,10 @@ -{% from "salt/map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import salt with context %} salt-minion: pkg.installed: - - name: {{ pkgs['salt-minion'] }} + - name: {{ salt['salt-minion'] }} file.recurse: - - name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d + - name: {{ salt.get('config-path', '/etc/salt') }}/minion.d - template: jinja - source: salt://salt/files/minion.d - clean: True @@ -12,7 +12,7 @@ salt-minion: standalone: False service.running: - enable: True - - name: {{ pkgs.get('minion-service', 'salt-minion') }} + - name: {{ salt.get('minion-service', 'salt-minion') }} - watch: - pkg: salt-minion - file: salt-minion diff --git a/salt/ssh.sls b/salt/ssh.sls index e32f5eb..411d57f 100644 --- a/salt/ssh.sls +++ b/salt/ssh.sls @@ -1,12 +1,12 @@ -{% from "salt/map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import salt with context %} ensure salt-ssh is installed: pkg.installed: - - name: {{ pkgs['salt-ssh'] }} + - name: {{ salt['salt-ssh'] }} ensure roster config: file.managed: - - name: {{ pkgs.get('config_path', '/etc/salt') }}/roster + - name: {{ salt.get('config_path', '/etc/salt') }}/roster - source: salt://salt/files/roster.jinja - template: jinja - require: diff --git a/salt/standalone.sls b/salt/standalone.sls index e4a8cd2..aaa2007 100644 --- a/salt/standalone.sls +++ b/salt/standalone.sls @@ -1,10 +1,10 @@ -{% from "salt/map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import salt with context %} salt-minion: pkg.installed: - - name: {{ pkgs['salt-minion'] }} + - name: {{ salt['salt-minion'] }} file.recurse: - - name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d + - name: {{ salt.get('config-path', '/etc/salt') }}/minion.d - template: jinja - source: salt://salt/files/minion.d - clean: True @@ -12,7 +12,7 @@ salt-minion: standalone: True service.dead: - enable: False - - name: {{ pkgs.get('minion-service', 'salt-minion') }} + - name: {{ salt.get('minion-service', 'salt-minion') }} - require: - pkg: salt-minion - file: salt-minion diff --git a/salt/syndic.sls b/salt/syndic.sls index 5af99e4..a9ec986 100644 --- a/salt/syndic.sls +++ b/salt/syndic.sls @@ -1,15 +1,15 @@ -{% from "salt/map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import salt with context %} include: - salt.master salt-syndic: pkg.installed: - - name: {{ pkgs['salt-syndic'] }} + - name: {{ salt['salt-syndic'] }} service: - running - require: - - service: {{ pkgs.get('syndic-service', 'salt-master') }} + - service: {{ salt.get('syndic-service', 'salt-master') }} - watch: - pkg: salt-master - - file: {{ pkgs.get('config-path', '/etc/salt') }}/master + - file: {{ salt.get('config-path', '/etc/salt') }}/master