split ospf/ into quagga/{zebra,ospfd}/

This commit is contained in:
Astro 2016-12-19 01:29:38 +01:00
parent cc466b46e9
commit 0ceccb4746
10 changed files with 43 additions and 41 deletions

View File

@ -3,18 +3,18 @@ base:
- hosts
- subnets
- vlans
- ospf
- quagga.ospfd
'priv*-gw':
- dhcp
- ospf.gw
- quagga.ospfd.gw
'pub-gw':
- dhcp
- ospf.gw
- quagga.ospfd.gw
'serv-gw':
- dhcp
- ospf.gw
- quagga.ospfd.gw
'c3d2-gw or c3d2-anon':
- ospf.gw
- quagga.ospfd.gw
'anon1':
- vpn.anon1
- upstream.anon1

View File

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

View File

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

View File

@ -3,22 +3,26 @@ base:
- salt-master
- server1-network
- lxc-containers
- ospf
- quagga.zebra
- quagga.ospfd
- switches
- cpe
'priv*-gw':
- no-ssh
- forwarding
- ospf
- quagga.zebra
- quagga.ospfd
- dhcp
'c3d2-gw or c3d2-anon':
- no-ssh
- forwarding
- ospf
- quagga.zebra
- quagga.ospfd
'upstream*':
- no-ssh
- forwarding
- ospf
- quagga.zebra
- quagga.ospfd
- unbound
- upstream.dhcp
- upstream.shaping
@ -32,7 +36,8 @@ base:
'anon*':
- no-ssh
- forwarding
- ospf
- quagga.zebra
- quagga.ospfd
- vpn.openvpn
- upstream.masquerade
- upstream.shaping