forked from zentralwerk/network
move lxc-containers data to pillar
This commit is contained in:
parent
3bb52c08c5
commit
24ed406026
|
@ -0,0 +1,47 @@
|
||||||
|
containers:
|
||||||
|
pub-gw:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: anon1
|
||||||
|
pub:
|
||||||
|
type: phys
|
||||||
|
|
||||||
|
serv-gw:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: upstream1
|
||||||
|
serv:
|
||||||
|
type: veth
|
||||||
|
|
||||||
|
priv1-gw:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: upstream1
|
||||||
|
|
||||||
|
priv2-gw:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: upstream1
|
||||||
|
|
||||||
|
upstream1:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
up1:
|
||||||
|
type: phys
|
||||||
|
|
||||||
|
upstream2:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
up2:
|
||||||
|
type: phys
|
||||||
|
|
||||||
|
anon1:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
|
@ -12,4 +12,5 @@ base:
|
||||||
'upstream1':
|
'upstream1':
|
||||||
- upstream.upstream1
|
- upstream.upstream1
|
||||||
'server1':
|
'server1':
|
||||||
|
- lxc-containers.server1
|
||||||
- switches
|
- switches
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
pub-gw:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
gw: anon1
|
|
||||||
pub:
|
|
||||||
type: phys
|
|
||||||
|
|
||||||
serv-gw:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
gw: upstream1
|
|
||||||
serv:
|
|
||||||
type: veth
|
|
||||||
|
|
||||||
priv1-gw:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
gw: upstream1
|
|
||||||
|
|
||||||
priv2-gw:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
gw: upstream1
|
|
||||||
|
|
||||||
upstream1:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
up1:
|
|
||||||
type: phys
|
|
||||||
|
|
||||||
upstream2:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
||||||
up2:
|
|
||||||
type: phys
|
|
||||||
|
|
||||||
anon1:
|
|
||||||
interfaces:
|
|
||||||
core:
|
|
||||||
type: veth
|
|
|
@ -1,9 +1,7 @@
|
||||||
{%- import_yaml "lxc-containers-1/containers.yaml" as containers -%}
|
|
||||||
|
|
||||||
lxc:
|
lxc:
|
||||||
pkg.installed: []
|
pkg.installed: []
|
||||||
|
|
||||||
{% for id, container in containers.items() %}
|
{% for id, container in pillar['containers'].items() %}
|
||||||
|
|
||||||
/var/lib/lxc/{{ id }}:
|
/var/lib/lxc/{{ id }}:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
|
@ -14,7 +12,7 @@ lxc:
|
||||||
|
|
||||||
/var/lib/lxc/{{ id }}/config:
|
/var/lib/lxc/{{ id }}/config:
|
||||||
file.managed:
|
file.managed:
|
||||||
- source: salt://lxc-containers-1/config
|
- source: salt://lxc-containers/config
|
||||||
- template: 'jinja'
|
- template: 'jinja'
|
||||||
- context:
|
- context:
|
||||||
id: {{ id }}
|
id: {{ id }}
|
||||||
|
@ -37,7 +35,7 @@ lxc:
|
||||||
|
|
||||||
/var/lib/lxc/{{ id }}/rootfs/etc/hosts:
|
/var/lib/lxc/{{ id }}/rootfs/etc/hosts:
|
||||||
file.managed:
|
file.managed:
|
||||||
- source: salt://lxc-containers-1/hosts
|
- source: salt://lxc-containers/hosts
|
||||||
- template: 'jinja'
|
- template: 'jinja'
|
||||||
- context:
|
- context:
|
||||||
id: {{ id }}
|
id: {{ id }}
|
|
@ -2,7 +2,7 @@ base:
|
||||||
'server1':
|
'server1':
|
||||||
- salt-master
|
- salt-master
|
||||||
- server1-network
|
- server1-network
|
||||||
- lxc-containers-1
|
- lxc-containers
|
||||||
- ospf
|
- ospf
|
||||||
- switches
|
- switches
|
||||||
'*-gw':
|
'*-gw':
|
||||||
|
|
Loading…
Reference in New Issue