Sfoglia il codice sorgente

support ipv6 network configuration

tags/v0.1
Arnold Bechtoldt 10 anni fa
parent
commit
bebba16f76
3 ha cambiato i file con 25 aggiunte e 9 eliminazioni
  1. +17
    -5
      network/defaults.yaml
  2. +3
    -4
      network/interfaces.sls
  3. +5
    -0
      pillar.example.sls

+ 17
- 5
network/defaults.yaml Vedi File

@@ -4,10 +4,10 @@ Debian:
interfaces:
pkgs: []
default_values:
enable: True
proto: dhcp
enabled: True
type: eth
params_supported:
- proto
- ipaddr
- gateway
- netmask
@@ -26,6 +26,12 @@ Debian:
- mode
- slaves
#TODO - broadcast
# IPV6
- enable_ipv6
- ipv6proto
- ipv6ipaddr
- ipv6netmask
- ipv6gateway
def_entries:
- name: lo
proto: loopback
@@ -61,11 +67,11 @@ RedHat:
interfaces:
pkgs: []
vlan_pkg: False
values:
enable: True
proto: dhcp
default_values:
enabled: True
type: eth
params_supported:
- proto
- ipaddr
- gateway
- netmask
@@ -84,6 +90,12 @@ RedHat:
- mode
- slaves
#TODO - broadcast
# IPV6
- enable_ipv6
- ipv6proto
- ipv6ipaddr
- ipv6netmask
- ipv6gateway
def_entries: []
# - name: lo
# proto: none

+ 3
- 4
network/interfaces.sls Vedi File

@@ -17,12 +17,11 @@
{% endif %}

{% for n in interfaces %}
network-{{ n.name }}:
network_{{ n.name }}:
network:
- managed
- name: {{ n.name }}
- enabled: {{ n.enable|default(datamap.interfaces.default_values.enable) }}
- proto: {{ n.proto|default(datamap.interfaces.default_values.proto) }}
- enabled: {{ n.enabled|default(datamap.interfaces.default_values.enabled) }}
- type: {{ n.type|default(datamap.interfaces.default_values.type) }}
{% for p in datamap.interfaces.params_supported %}
{{ set_p(p, n) }}
@@ -30,7 +29,7 @@ network-{{ n.name }}:
{% if n.use is defined %}
- use:
{% for u in n.use %}
- network: network-{{ u }}
- network: network_{{ u }}
{% endfor %}
{% endif %}
{% if n.provider is defined %}

+ 5
- 0
pillar.example.sls Vedi File

@@ -41,6 +41,11 @@ network:
ipaddr: 192.168.2.31
netmask: 255.255.255.0
gateway: 192.168.2.1
enable_ipv6: True
ipv6proto: static
ipv6ipaddr: '2a03:4000:c:100::a'
ipv6netmask: 64
ipv6gateway: 'fe80::1'

resolver:
domain: domain.local

Loading…
Annulla
Salva