소스 검색

Support for cross-formula dependency installation

This change adds support for installation of other formula dependencies
during run of salt.minion state. Due to this, other states are able to
run successfuly on first run because their modules' dependencies are
already satisfied and loaded.

Change-Id: I6e3149b808be641125b82c650f98cd09f79dd631
pull/73/head
Filip Pytloun 6 년 전
부모
커밋
57621371cb
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. +28
    -0
      salt/minion/service.sls

+ 28
- 0
salt/minion/service.sls 파일 보기

@@ -59,6 +59,34 @@ salt_minion_config_{{ service_name }}_{{ name }}_validity_check:
- cmd: salt_minion_service_restart
{%- endfor %}
{%- endif %}

{%- if support_yaml and support_yaml.get('dependency', {}) %}
{%- if support_yaml.get('engine', 'pkg') == 'pkg' %}

salt_minion_{{ service_name }}_dependencies:
pkg.installed:
- names: {{ support_yaml.pkgs }}
- onchanges_in:
- cmd: salt_minion_service_restart
{%- elif support_yaml.engine == 'pip' %}
{%- if support_yaml.get('pkgs') %}
salt_minion_{{ service_name }}_dependencies:
pip.installed:
- names: {{ support_yaml.pkgs }}
- onchanges_in:
- cmd: salt_minion_service_restart
- require_in:
- pip: salt_minion_{{ service_name }}_dependencies_pip
{%- endif %}

salt_minion_{{ service_name }}_dependencies_pip:
pip.installed:
- names: {{ support_yaml.python_pkgs }}
- onchanges_in:
- cmd: salt_minion_service_restart

{%- endif %}
{%- endif %}
{%- endfor %}

salt_minion_service:

Loading…
취소
저장