Fix dependency on states

As per https://docs.saltstack.com/en/latest/ref/states/requisites.html#require,
the `require` dependency on a sls file needs an include, which was missing
This commit is contained in:
Javier Bértoli 2019-03-10 22:47:54 -03:00
parent dbae802521
commit df99e1cdcc
6 changed files with 35 additions and 2 deletions

View file

@ -7,6 +7,13 @@
{% set wanted_gems = packages.gems.wanted %} {% set wanted_gems = packages.gems.wanted %}
{% set unwanted_gems = packages.gems.unwanted %} {% set unwanted_gems = packages.gems.unwanted %}
{% if req_states %}
include:
{% for dep in req_states %}
- {{ dep }}
{% endfor %}
{% endif %}
### REQ PKGS (without these, some of the WANTED GEMS will fail to install) ### REQ PKGS (without these, some of the WANTED GEMS will fail to install)
gem_req_pkgs: gem_req_pkgs:
pkg.installed: pkg.installed:

View file

@ -7,6 +7,13 @@
{% set wanted_npms = packages.npms.wanted %} {% set wanted_npms = packages.npms.wanted %}
{% set unwanted_npms = packages.npms.unwanted %} {% set unwanted_npms = packages.npms.unwanted %}
{% if req_states %}
include:
{% for dep in req_states %}
- {{ dep }}
{% endfor %}
{% endif %}
### REQ PKGS (without these, some of the WANTED PIPS will fail to install) ### REQ PKGS (without these, some of the WANTED PIPS will fail to install)
npm_req_pkgs: npm_req_pkgs:
pkg.installed: pkg.installed:

View file

@ -8,6 +8,13 @@
{% set unwanted_pips = packages.pips.unwanted %} {% set unwanted_pips = packages.pips.unwanted %}
{% set pip_config = packages.pips.config %} {% set pip_config = packages.pips.config %}
{% if req_states %}
include:
{% for dep in req_states %}
- {{ dep }}
{% endfor %}
{% endif %}
### REQ PKGS (without these, some of the WANTED PIPS will fail to install) ### REQ PKGS (without these, some of the WANTED PIPS will fail to install)
pip_req_pkgs: pip_req_pkgs:
pkg.installed: pkg.installed:

View file

@ -9,6 +9,13 @@
{% set wanted_packages = packages.pkgs.wanted %} {% set wanted_packages = packages.pkgs.wanted %}
{% set unwanted_packages = packages.pkgs.unwanted %} {% set unwanted_packages = packages.pkgs.unwanted %}
{% if req_states %}
include:
{% for dep in req_states %}
- {{ dep }}
{% endfor %}
{% endif %}
### PRE-REQ PKGS (without these, some of the WANTED PKGS will fail to install) ### PRE-REQ PKGS (without these, some of the WANTED PKGS will fail to install)
pkg_req_pkgs: pkg_req_pkgs:
pkg.installed: pkg.installed:

View file

@ -18,6 +18,11 @@
### REQ PKGS (without this, SNAPS can fail to install/uninstall) ### REQ PKGS (without this, SNAPS can fail to install/uninstall)
include: include:
- packages.pkgs - packages.pkgs
{% if req_states %}
{% for dep in req_states %}
- {{ dep }}
{% endfor %}
{% endif %}
extend: extend:
unwanted_pkgs: unwanted_pkgs:

View file

@ -70,8 +70,8 @@ packages:
# env: None # A list of environment variables to be set prior to execution # env: None # A list of environment variables to be set prior to execution
# force_reinstall: False # Install the package even if it is already installed # force_reinstall: False # Install the package even if it is already installed
required: required:
pkgs: states:
- nodejs - node.pkg
wanted: wanted:
# Valid formats: # Valid formats:
# #