From f89c0f5936fc654b321f9c691e5b213957aea086 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 31 Mar 2024 23:37:31 -0400 Subject: [PATCH] Allow specifying arguments for chocolatey packages --- chocolatey-packages.sls | 11 ++++++-- packages.yaml | 56 ++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/chocolatey-packages.sls b/chocolatey-packages.sls index cf888a4..64863e3 100644 --- a/chocolatey-packages.sls +++ b/chocolatey-packages.sls @@ -10,6 +10,9 @@ include: "install {{ pkg }}": chocolatey.installed: - name: {{ pkg }} + {% if pkg in packages and packages[pkg] %} + {{ packages[pkg] | dict_to_sls_yaml_params | indent }} + {% endif %} - require: - sls: chocolatey {% endfor %} @@ -19,8 +22,12 @@ include: {% set outdated_pkg = outdated_pkg_lines|map('method_call', 'split', '|', 1)|map(attribute=0) %} {% for pkg in outdated_pkg|difference(['chitubox', 'sketchup', 'autodesk-fusion360']) %} "update {{ pkg }}": - chocolatey.upgraded: - - name: "{{ pkg }}" + module.run: + - chocolatey.upgrade: + - name: "{{ pkg }}" + {% if pkg in packages and packages[pkg] %} + {{ packages[pkg] | dict_to_sls_yaml_params | indent }} + {% endif %} - require: - chocolateyBootstrap {% endfor %} diff --git a/packages.yaml b/packages.yaml index ad1afba..214b567 100644 --- a/packages.yaml +++ b/packages.yaml @@ -1,42 +1,42 @@ # Admin Tools -- choco-cleaner +choco-cleaner: # Browsers -- firefox -- googlechrome +firefox: +googlechrome: # Development Tools -- arduino -- git -- javaruntime -- notepadplusplus -- python -- vim -- vscode -- rpi-imager +arduino: +git: +javaruntime: +notepadplusplus: +python: +vim: +vscode: +rpi-imager: # Graphics -- gimp -- inkscape +gimp: +inkscape: # 3D Modeling -- autodesk-fusion360 -- meshmixer -- blender -- cura-lulzbot -- openscad -- freecad -- chitubox -- solvespace +autodesk-fusion360: +meshmixer: +blender: +cura-lulzbot: +openscad: +freecad: +chitubox: +solvespace: -- kicad +kicad: # Office -- 7zip -- adobereader -- libreoffice-fresh -- vlc -- itunes +7zip: +adobereader: +libreoffice-fresh: +vlc: +itunes: # Education -- minecraft-education +minecraft-education: