2015-03-17 05:39:32 +01:00
|
|
|
{% from "salt/map.jinja" import salt_settings with context %}
|
2015-03-07 23:43:32 +01:00
|
|
|
|
|
|
|
include:
|
|
|
|
- salt.master
|
|
|
|
|
2015-07-21 00:05:57 +02:00
|
|
|
salt-api:
|
2015-07-21 00:05:57 +02:00
|
|
|
{% if salt_settings.install_packages %}
|
2015-03-07 23:43:32 +01:00
|
|
|
pkg.installed:
|
2015-07-21 00:05:57 +02:00
|
|
|
- name: {{ salt_settings.salt_api }}
|
2018-02-01 11:13:55 +01:00
|
|
|
{%- if salt_settings.version is defined %}
|
|
|
|
- version: {{ salt_settings.version }}
|
|
|
|
{%- endif %}
|
2015-07-21 00:05:57 +02:00
|
|
|
{% endif %}
|
2020-02-17 15:20:33 +01:00
|
|
|
{% if salt_settings.api_service_details.state != 'ignore' %}
|
|
|
|
service.{{ salt_settings.api_service_details.state }}:
|
|
|
|
- enable: {{ salt_settings.api_service_details.enabled }}:
|
2015-07-21 00:05:57 +02:00
|
|
|
- name: {{ salt_settings.api_service }}
|
2015-03-07 23:43:32 +01:00
|
|
|
- require:
|
2015-07-21 00:05:57 +02:00
|
|
|
- service: {{ salt_settings.master_service }}
|
2015-03-07 23:43:32 +01:00
|
|
|
- watch:
|
2016-12-02 07:28:30 +01:00
|
|
|
{% if salt_settings.install_packages %}
|
2015-08-08 17:58:45 +02:00
|
|
|
- pkg: salt-api
|
|
|
|
{% endif %}
|
2016-12-02 07:28:30 +01:00
|
|
|
- file: salt-master
|
2020-02-17 15:20:33 +01:00
|
|
|
{% endif %}
|