Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions CHANGELOG.rst

This file was deleted.

53 changes: 53 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,56 @@ Tests
* **pillar:** use single ubuntu pillar (\ `c69cb5a <https://github.com/saltstack-formulas/packages-formula/commit/c69cb5a792186a8a1600987087389229ddf7a67a>`_\ )
* **pillar:** use specific pillar for ``debian`` (\ `adf1523 <https://github.com/saltstack-formulas/packages-formula/commit/adf1523e08bfeff8d635052a8942b48326e507cb>`_\ )
* fix existing tests (\ `8e75c9d <https://github.com/saltstack-formulas/packages-formula/commit/8e75c9d5c0c4af5fe4e56ecfcdfcc7ea7486d4dc>`_\ )

----

0.1.0 (2019-03-10)
------------------

* Add npm support

0.0.9 (2018-10-03)
------------------

* Add support for plain files using archive

0.0.8 (2018-08-23)
------------------

* Add archive support

0.0.7 (2018-07-11)
------------------

* Fix pip/gems for FreeBSD

0.0.6 (2018-04-09)
------------------

* Add snap with classic confinement support

0.0.5 (2018-03-14)
------------------

* Add snap support

0.0.4 (2018-03-06)
------------------

* Allow to specify held system packages also as a list (#10)

0.0.3 (2018-03-02)
------------------

* Allow to hold/unhold system packages (#8)

0.0.2 (2018-02-23)
------------------

* Add Fedora support
* Add more tests

0.0.1 (2018-02-12)
------------------

* Initial version
18 changes: 18 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,24 @@ to install, in the format:

``name: url``


`packages.chocolatey``
^^^^^^^^^^^^^^^^^^^^^^

You can specify:

* ``wanted`` chocolatey packages, which will be installed using chocolatey. Requires you
specify the correct ``chocolatey`` package (see the pillar.example)
* ``unwanted`` chocolatey packages, which will be uninstalled using chocolatey.
* ``required system packages`` on which any of the ``wanted`` system packages
depend for their correct installation.
* ``required states`` on which any of the ``wanted`` packages depend for their
correct installation (ie, ``regedit`` for configurations).

.. note::

You must configure `winrepo-ng <https://github.com/saltstack/salt-winrepo-ng>`_ in order to install chocolatey required package

Testing
-------

Expand Down
53 changes: 53 additions & 0 deletions packages/chocolatey.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{% from "packages/map.jinja" import packages with context %}

{% if grains['os'] == 'Windows' %}

{% if packages.chocolatey %}
{% 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
{% if wanted_chocolatey %}
{% 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 %}
{% endif %}

### CHOCOLATEY PACKAGES to uninstall
{% if unwanted_chocolatey %}
{% for uchoco in unwanted_chocolatey %}
{{ uchoco }}:
chocolatey.uninstalled:
- name: {{ uchoco }}
{% endfor %}
{% endif %}
{% endif %}

{% endif %}
6 changes: 6 additions & 0 deletions packages/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ packages:
required:
states: []
pkgs: []
chocolatey:
wanted: []
unwanted: []
required:
states: []
pkgs: []
npms:
wanted: []
unwanted: []
Expand Down
1 change: 1 addition & 0 deletions packages/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ include:
- packages.archives
- packages.snaps
- packages.golang
- packages.chocolatey
6 changes: 6 additions & 0 deletions packages/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ FreeBSD:
pkgs:
- lang/ruby25
- devel/ruby-gems

Windows:
chocolatey:
required:
pkgs:
- chocolatey
11 changes: 11 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ packages:
- kitchen-vagrant
- kwalify

chocolatey:
wanted:
firefox:
install_args: "l=fr-FR"
packagename:
version: '12.04'
source: 'mychocolatey/source'
force: true
unwanted:
- googlechrome

snaps:
wanted:
- hello-world
Expand Down