-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chocolatey): add chocolatey management support
- Loading branch information
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
{% from "packages/map.jinja" import packages with context %} | ||
{% set req_states = packages.chocolatey.required.states %} | ||
{% set req_pkgs = packages.chocolatey.required.pkgs %} | ||
{% set wanted_chocolatey = packages.chocolatey.wanted %} | ||
{% set unwanted_chocolatey = packages.chocolatey.unwanted %} | ||
{% if req_states %} | ||
include: | ||
{% for dep in req_states %} | ||
- {{ dep }} | ||
{% endfor %} | ||
{% endif %} | ||
chocolatey_req_pkgs: | ||
pkg.installed: | ||
- pkgs: {{ req_pkgs | json }} | ||
- retry: {{ packages.retry_options|json }} | ||
### CHOCOLATEY PACKAGES to install | ||
{% for choco, settings in wanted_chocolatey.items() %} | ||
{{ choco }}: | ||
chocolatey.installed: | ||
- name: {{ choco }} | ||
- version: {{ '' if 'version' not in settings else settings.version }} | ||
- source: {{ '' if 'source' not in settings else settings.source }} | ||
- force: {{ False if 'force' not in settings else settings.force }} | ||
- pre_versions: {{ False if 'pre_versions' not in settings else settings.pre_versions }} | ||
- install_args: {{ '' if 'install_args' not in settings else settings.install_args }} | ||
- override_args: {{ False if 'override_args' not in settings else settings.override_args }} | ||
- force_x86: {{ False if 'force_x86' not in settings else settings.force_x86 }} | ||
- 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 }} | ||
{% endfor %} | ||
### CHOCOLATEY PACKAGES to uninstall | ||
{% for uchoco in unwanted_chocolatey %} | ||
{{ uchoco }}: | ||
chocolatey.uninstalled: | ||
- name: {{ uchoco }} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ include: | |
- packages.archives | ||
- packages.snaps | ||
- packages.golang | ||
- packages.chocolatey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,9 @@ FreeBSD: | |
pkgs: | ||
- lang/ruby25 | ||
- devel/ruby-gems | ||
|
||
Windows: | ||
chocolatey: | ||
required: | ||
pkgs: | ||
- chocolatey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters