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 }}:
|
2020-04-03 11:07:46 +02:00
|
|
|
- enable: {{ salt_settings.api_service_details.enabled }}
|
2015-07-21 00:05:57 +02:00
|
|
|
- name: {{ salt_settings.api_service }}
|
2022-04-03 11:26:20 +02:00
|
|
|
{%- if grains.os_family in ['FreeBSD', 'Gentoo'] %}
|
2021-04-23 10:13:59 +02:00
|
|
|
- retry: {{ salt_settings.retry_options | json }}
|
|
|
|
{%- endif %}
|
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 %}
|