Add odl bgpvpn noha scenario to fuel
[fuel.git] / mcp / salt-formulas / salt-formula-quagga / quagga / server.sls
1 ##############################################################################
2 # Copyright (c) 2018 Intracom Telecom and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- from "quagga/map.jinja" import server with context %}
9 {%- if server.enabled %}
10
11 quagga_packages:
12   pkg.installed:
13   - names: {{ server.pkgs }}
14
15 download_quagga:
16   file.managed:
17   - name: /var/cache/quagga.tar.gz
18   - source: {{ server.quagga_package_url }}
19   - source_hash: {{ server.quagga_package_checksum }}
20   - user: root
21   - group: root
22
23 unarchive_quagga:
24   archive.extracted:
25   - source: /var/cache/quagga.tar.gz
26   - name: /tmp
27   - user: root
28   - group: root
29
30 install_quagga_packages:
31   cmd.run:
32   - name: {{ server.install_cmd }} $(ls |grep -vE 'debuginfo|devel|contrib')
33   - cwd: /tmp/quagga
34   - runas: root
35
36 start_zebra_rpc_daemon:
37   cmd.run:
38   - name: /opt/quagga/etc/init.d/zrpcd start
39   - runas: root
40
41 {%- endif %}