split ospf/ into quagga/{zebra,ospfd}/
This commit is contained in:
parent
cc466b46e9
commit
0ceccb4746
|
@ -3,18 +3,18 @@ base:
|
||||||
- hosts
|
- hosts
|
||||||
- subnets
|
- subnets
|
||||||
- vlans
|
- vlans
|
||||||
- ospf
|
- quagga.ospfd
|
||||||
'priv*-gw':
|
'priv*-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
- ospf.gw
|
- quagga.ospfd.gw
|
||||||
'pub-gw':
|
'pub-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
- ospf.gw
|
- quagga.ospfd.gw
|
||||||
'serv-gw':
|
'serv-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
- ospf.gw
|
- quagga.ospfd.gw
|
||||||
'c3d2-gw or c3d2-anon':
|
'c3d2-gw or c3d2-anon':
|
||||||
- ospf.gw
|
- quagga.ospfd.gw
|
||||||
'anon1':
|
'anon1':
|
||||||
- vpn.anon1
|
- vpn.anon1
|
||||||
- upstream.anon1
|
- upstream.anon1
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
quagga:
|
|
||||||
pkg.installed: []
|
|
||||||
|
|
||||||
{%- for daemon in ['zebra', 'ospfd'] %}
|
|
||||||
/etc/systemd/system/{{ daemon }}.service:
|
|
||||||
file.managed:
|
|
||||||
- source: salt://ospf/{{ daemon }}.service
|
|
||||||
|
|
||||||
/etc/quagga/{{ daemon }}.conf:
|
|
||||||
file.managed:
|
|
||||||
- source: salt://ospf/{{ daemon }}.conf
|
|
||||||
- template: 'jinja'
|
|
||||||
- require:
|
|
||||||
- pkg: quagga
|
|
||||||
|
|
||||||
autostart-{{ daemon }}:
|
|
||||||
service.enabled:
|
|
||||||
- name: {{ daemon }}
|
|
||||||
require:
|
|
||||||
- file: /etc/systemd/system/{{ daemon }}.service
|
|
||||||
- file: /etc/quagga/{{ daemon }}.conf
|
|
||||||
|
|
||||||
start-{{ daemon }}:
|
|
||||||
service.running:
|
|
||||||
- name: {{ daemon }}
|
|
||||||
require:
|
|
||||||
- service: autostart-{{ daemon }}
|
|
||||||
watch:
|
|
||||||
- file: /etc/quagga/{{ daemon }}.conf
|
|
||||||
|
|
||||||
{%- endfor %}
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
quagga:
|
||||||
|
pkg.installed: []
|
||||||
|
|
||||||
|
/etc/systemd/system/ospfd.service:
|
||||||
|
file.managed:
|
||||||
|
- source: salt://quagga/ospfd/ospfd.service
|
||||||
|
|
||||||
|
/etc/quagga/ospfd.conf:
|
||||||
|
file.managed:
|
||||||
|
- source: salt://quagga/ospfd/ospfd.conf
|
||||||
|
- template: 'jinja'
|
||||||
|
- require:
|
||||||
|
- pkg: quagga
|
||||||
|
|
||||||
|
autostart-ospfd:
|
||||||
|
service.enabled:
|
||||||
|
- name: ospfd
|
||||||
|
require:
|
||||||
|
- file: /etc/systemd/system/ospfd.service
|
||||||
|
- file: /etc/quagga/ospfd.conf
|
||||||
|
|
||||||
|
start-ospfd:
|
||||||
|
service.running:
|
||||||
|
- name: ospfd
|
||||||
|
require:
|
||||||
|
- service: autostart-ospfd
|
||||||
|
watch:
|
||||||
|
- file: /etc/quagga/ospfd.conf
|
15
salt/top.sls
15
salt/top.sls
|
@ -3,22 +3,26 @@ base:
|
||||||
- salt-master
|
- salt-master
|
||||||
- server1-network
|
- server1-network
|
||||||
- lxc-containers
|
- lxc-containers
|
||||||
- ospf
|
- quagga.zebra
|
||||||
|
- quagga.ospfd
|
||||||
- switches
|
- switches
|
||||||
- cpe
|
- cpe
|
||||||
'priv*-gw':
|
'priv*-gw':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
- ospf
|
- quagga.zebra
|
||||||
|
- quagga.ospfd
|
||||||
- dhcp
|
- dhcp
|
||||||
'c3d2-gw or c3d2-anon':
|
'c3d2-gw or c3d2-anon':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
- ospf
|
- quagga.zebra
|
||||||
|
- quagga.ospfd
|
||||||
'upstream*':
|
'upstream*':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
- ospf
|
- quagga.zebra
|
||||||
|
- quagga.ospfd
|
||||||
- unbound
|
- unbound
|
||||||
- upstream.dhcp
|
- upstream.dhcp
|
||||||
- upstream.shaping
|
- upstream.shaping
|
||||||
|
@ -32,7 +36,8 @@ base:
|
||||||
'anon*':
|
'anon*':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
- ospf
|
- quagga.zebra
|
||||||
|
- quagga.ospfd
|
||||||
- vpn.openvpn
|
- vpn.openvpn
|
||||||
- upstream.masquerade
|
- upstream.masquerade
|
||||||
- upstream.shaping
|
- upstream.shaping
|
||||||
|
|
Loading…
Reference in New Issue