Parcourir la source

fix mass install of formula pkgs

Previous approach fails when all of formulas are installed from git.

Change-Id: I0622461ee6469c59c1fd3ad4a23cdaeaeee1b444
pull/31/merge
Tomáš Kukrál il y a 7 ans
Parent
révision
04aa7b4bc7
1 fichiers modifiés avec 13 ajouts et 4 suppressions
  1. +13
    -4
      salt/master/env.sls

+ 13
- 4
salt/master/env.sls Voir le fichier

@@ -135,15 +135,24 @@ salt_env_{{ environment_name }}_dirs:

{%- endif %}

salt_master_{{ environment_name }}_pkg_formulas:
pkg.latest:
- pkgs:
{%- set _formula_pkgs = [] %}
{%- for formula_name, formula in environment.get('formula', {}).iteritems() %}
{%- if formula.source == 'pkg' %}
- {{ formula.name }}
{%- do _formula_pkgs.append(formula.name) %}
{%- endif %}
{%- endfor %}

{% if _formula_pkgs|length > 1 %}

salt_master_{{ environment_name }}_pkg_formulas:
pkg.latest:
- pkgs:
{%- for pkg in _formula_pkgs %}
- {{ pkg }}
{%- endfor %}

{% endif %}

{%- for formula_name, formula in environment.get('formula', {}).iteritems() %}

{%- if formula.source == 'git' %}

Chargement…
Annuler
Enregistrer