2
0
salt-formula/salt/master/package/install.sls
Daniel Dehennin 928b1a7c29 refactor(salt-master): move to subcomponents
Add a verifier in each sls to exclude windows platform.
2022-02-09 08:29:26 +01:00

27 lines
886 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_windows_excluded = tplroot ~ '.windows-excluded' %}
{%- set sls_pin_version = tplroot ~ '.pin' %}
{%- from tplroot ~ "/map.jinja" import salt_settings with context %}
{#- `salt-master` cannot be installed on Windows machines #}
{%- set sls_dependencies = [sls_windows_excluded] %}
{%- if salt_settings.pin_version and salt_settings.version and grains.os_family|lower == 'debian' %}
{%- do sls_dependencies.append(sls_pin_version) %}
{%- endif %}
include: {{ sls_dependencies }}
{%- if salt_settings.install_packages %}
salt-master-package-install-pkg.installed:
pkg.installed:
- name: {{ salt_settings.salt_master }}
- version: {{ salt_settings.version | default('~') }}
- require:
- sls: {{ sls_windows_excluded }}
{%- endif %}