{% 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', {}) -%} | {% set cloud = salt.get('cloud', {}) -%} | ||||
python-pip: | python-pip: | ||||
salt-cloud: | salt-cloud: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-cloud'] }} | |||||
- name: {{ salt['salt-cloud'] }} | |||||
- require: | - require: | ||||
- pip: apache-libcloud | - pip: apache-libcloud | ||||
- pip: pycrypto | - pip: pycrypto |
{% from "salt/map.jinja" import pkgs with context %} | |||||
{% from "salt/map.jinja" import salt with context %} | |||||
salt-master: | salt-master: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-master'] }} | |||||
- name: {{ salt['salt-master'] }} | |||||
file.recurse: | file.recurse: | ||||
- name: {{ pkgs.get('config-path', '/etc/salt') }}/master.d | |||||
- name: {{ salt.get('config-path', '/etc/salt') }}/master.d | |||||
- template: jinja | - template: jinja | ||||
- source: salt://salt/files/master.d | - source: salt://salt/files/master.d | ||||
- clean: True | - clean: True | ||||
service.running: | service.running: | ||||
- enable: True | - enable: True | ||||
- name: {{ pkgs.get('master-service', 'salt-master') }} | |||||
- name: {{ salt.get('master-service', 'salt-master') }} | |||||
- watch: | - watch: | ||||
- pkg: salt-master | - pkg: salt-master | ||||
- file: salt-master | - file: salt-master |
{% from "salt/map.jinja" import pkgs with context %} | |||||
{% from "salt/map.jinja" import salt with context %} | |||||
salt-minion: | salt-minion: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-minion'] }} | |||||
- name: {{ salt['salt-minion'] }} | |||||
file.recurse: | file.recurse: | ||||
- name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d | |||||
- name: {{ salt.get('config-path', '/etc/salt') }}/minion.d | |||||
- template: jinja | - template: jinja | ||||
- source: salt://salt/files/minion.d | - source: salt://salt/files/minion.d | ||||
- clean: True | - clean: True | ||||
standalone: False | standalone: False | ||||
service.running: | service.running: | ||||
- enable: True | - enable: True | ||||
- name: {{ pkgs.get('minion-service', 'salt-minion') }} | |||||
- name: {{ salt.get('minion-service', 'salt-minion') }} | |||||
- watch: | - watch: | ||||
- pkg: salt-minion | - pkg: salt-minion | ||||
- file: salt-minion | - file: salt-minion |
{% from "salt/map.jinja" import pkgs with context %} | |||||
{% from "salt/map.jinja" import salt with context %} | |||||
ensure salt-ssh is installed: | ensure salt-ssh is installed: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-ssh'] }} | |||||
- name: {{ salt['salt-ssh'] }} | |||||
ensure roster config: | ensure roster config: | ||||
file.managed: | file.managed: | ||||
- name: {{ pkgs.get('config_path', '/etc/salt') }}/roster | |||||
- name: {{ salt.get('config_path', '/etc/salt') }}/roster | |||||
- source: salt://salt/files/roster.jinja | - source: salt://salt/files/roster.jinja | ||||
- template: jinja | - template: jinja | ||||
- require: | - require: |
{% from "salt/map.jinja" import pkgs with context %} | |||||
{% from "salt/map.jinja" import salt with context %} | |||||
salt-minion: | salt-minion: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-minion'] }} | |||||
- name: {{ salt['salt-minion'] }} | |||||
file.recurse: | file.recurse: | ||||
- name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d | |||||
- name: {{ salt.get('config-path', '/etc/salt') }}/minion.d | |||||
- template: jinja | - template: jinja | ||||
- source: salt://salt/files/minion.d | - source: salt://salt/files/minion.d | ||||
- clean: True | - clean: True | ||||
standalone: True | standalone: True | ||||
service.dead: | service.dead: | ||||
- enable: False | - enable: False | ||||
- name: {{ pkgs.get('minion-service', 'salt-minion') }} | |||||
- name: {{ salt.get('minion-service', 'salt-minion') }} | |||||
- require: | - require: | ||||
- pkg: salt-minion | - pkg: salt-minion | ||||
- file: salt-minion | - file: salt-minion |
{% from "salt/map.jinja" import pkgs with context %} | |||||
{% from "salt/map.jinja" import salt with context %} | |||||
include: | include: | ||||
- salt.master | - salt.master | ||||
salt-syndic: | salt-syndic: | ||||
pkg.installed: | pkg.installed: | ||||
- name: {{ pkgs['salt-syndic'] }} | |||||
- name: {{ salt['salt-syndic'] }} | |||||
service: | service: | ||||
- running | - running | ||||
- require: | - require: | ||||
- service: {{ pkgs.get('syndic-service', 'salt-master') }} | |||||
- service: {{ salt.get('syndic-service', 'salt-master') }} | |||||
- watch: | - watch: | ||||
- pkg: salt-master | - pkg: salt-master | ||||
- file: {{ pkgs.get('config-path', '/etc/salt') }}/master | |||||
- file: {{ salt.get('config-path', '/etc/salt') }}/master |