- stp | - stp | ||||
- maxwait | - maxwait | ||||
- fd | - fd | ||||
- up_cmds | |||||
- pre_up_cmds | - pre_up_cmds | ||||
- pre_down_cmds | - pre_down_cmds | ||||
- post_up_cmds | - post_up_cmds | ||||
- ipv6ipaddr | - ipv6ipaddr | ||||
- ipv6netmask | - ipv6netmask | ||||
- ipv6gateway | - ipv6gateway | ||||
- pointopoint | |||||
- noifupdown | |||||
def_entries: | def_entries: | ||||
- name: lo | - name: lo | ||||
proto: loopback | proto: loopback | ||||
- stp | - stp | ||||
- maxwait | - maxwait | ||||
- fd | - fd | ||||
- up_cmds | |||||
- pre_up_cmds | - pre_up_cmds | ||||
- pre_down_cmds | - pre_down_cmds | ||||
- post_up_cmds | - post_up_cmds | ||||
- ipv6ipaddr | - ipv6ipaddr | ||||
- ipv6netmask | - ipv6netmask | ||||
- ipv6gateway | - ipv6gateway | ||||
- noifupdown | |||||
def_entries: [] | def_entries: [] | ||||
# - name: lo | # - name: lo | ||||
# proto: none | # proto: none |
{%- endif -%} | {%- endif -%} | ||||
{%- endmacro -%} | {%- endmacro -%} | ||||
{% if salt['pillar.get']('network:interfaces', False) %} | |||||
{%- if salt['pillar.get']('network:dhclient_conf', False) %} | |||||
dhclient_conf: | |||||
file: | |||||
- managed | |||||
- name: /etc/dhcp/dhclient.conf | |||||
- mode: 644 | |||||
- user: root | |||||
- group: root | |||||
- contents_pillar: network:dhclient_conf | |||||
{% endif %} | |||||
{%- if salt['pillar.get']('network:interfaces', False) %} | |||||
{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} | {% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} | ||||
{% endif %} | {% endif %} | ||||
#!jinja|yaml | |||||
{% for action, pkgs in salt['pillar.get']('network:pkgs', {}).iteritems() %} | |||||
network_pkgs_{{ action }}: | |||||
pkg: | |||||
- {{ action }} | |||||
- pkgs: {{ pkgs }} | |||||
{% endfor %} |
netmask: 255.255.0.0 | netmask: 255.255.0.0 | ||||
gateway: 192.168.2.1 | 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 |