瀏覽代碼

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 年之前
父節點
當前提交
392636df1a
共有 2 個檔案被更改,包括 14 行新增0 行删除
  1. +7
    -0
      network/packages.sls
  2. +7
    -0
      pillar.example.sls

+ 7
- 0
network/packages.sls 查看文件

@@ -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 查看文件

@@ -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

Loading…
取消
儲存