Bläddra i källkod

Add a simple way to add/remove packages with the network state.

Use:
network:
pkgs:
    purged:
      - resolvconf
    installed:
      - isc-dhcp-client
pull/9/head
René Jochum 9 år sedan
förälder
incheckning
392636df1a
2 ändrade filer med 14 tillägg och 0 borttagningar
  1. +7
    -0
      network/packages.sls
  2. +7
    -0
      pillar.example.sls

+ 7
- 0
network/packages.sls Visa fil

@@ -0,0 +1,7 @@
#!jinja|yaml

{% for action, pkgs in salt['pillar.get']('network:pkgs', {}).iteritems() %}
network_pkgs_{{ action }}:
pkg.{{ action }}:
- pkgs: {{ pkgs }}
{% endfor %}

+ 7
- 0
pillar.example.sls Visa fil

@@ -81,3 +81,10 @@ network:
netmask: 255.255.0.0
gateway: 192.168.2.1

# To add/remove packages here.
# You need to include the state network.packages in your salt.
pkgs:
purged:
- resolvconf
installed:
- isc-dhcp-client

Laddar…
Avbryt
Spara