mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-17 10:10:27 +00:00
fix(chocolatey): verify chocolatey dicts are not empty
This commit is contained in:
parent
c0c1195242
commit
385b2238f4
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
{% from "packages/map.jinja" import packages with context %}
|
{% from "packages/map.jinja" import packages with context %}
|
||||||
|
|
||||||
|
{% if packages.chocolatey %}
|
||||||
{% set req_states = packages.chocolatey.required.states %}
|
{% set req_states = packages.chocolatey.required.states %}
|
||||||
{% set req_pkgs = packages.chocolatey.required.pkgs %}
|
{% set req_pkgs = packages.chocolatey.required.pkgs %}
|
||||||
{% set wanted_chocolatey = packages.chocolatey.wanted %}
|
{% set wanted_chocolatey = packages.chocolatey.wanted %}
|
||||||
|
@ -20,6 +21,7 @@ chocolatey_req_pkgs:
|
||||||
- retry: {{ packages.retry_options|json }}
|
- retry: {{ packages.retry_options|json }}
|
||||||
|
|
||||||
### CHOCOLATEY PACKAGES to install
|
### CHOCOLATEY PACKAGES to install
|
||||||
|
{% if wanted_chocolatey %}
|
||||||
{% for choco, settings in wanted_chocolatey.items() %}
|
{% for choco, settings in wanted_chocolatey.items() %}
|
||||||
{{ choco }}:
|
{{ choco }}:
|
||||||
chocolatey.installed:
|
chocolatey.installed:
|
||||||
|
@ -34,10 +36,14 @@ chocolatey_req_pkgs:
|
||||||
- package_args: {{ '' if 'package_args' not in settings else settings.package_args }}
|
- package_args: {{ '' if 'package_args' not in settings else settings.package_args }}
|
||||||
- allow_multiple: {{ False if 'allow_multiple' not in settings else settings.allow_multiple }}
|
- allow_multiple: {{ False if 'allow_multiple' not in settings else settings.allow_multiple }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
### CHOCOLATEY PACKAGES to uninstall
|
### CHOCOLATEY PACKAGES to uninstall
|
||||||
|
{% if unwanted_chocolatey %}
|
||||||
{% for uchoco in unwanted_chocolatey %}
|
{% for uchoco in unwanted_chocolatey %}
|
||||||
{{ uchoco }}:
|
{{ uchoco }}:
|
||||||
chocolatey.uninstalled:
|
chocolatey.uninstalled:
|
||||||
- name: {{ uchoco }}
|
- name: {{ uchoco }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue