Update OpenDaylight version to Neon
[fuel.git] / mcp / salt-formulas / salt-formula-opendaylight / opendaylight / server.sls
1 ##############################################################################
2 # Copyright (c) 2019 Mirantis Inc. 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 "opendaylight/map.jinja" import server with context %}
9
10 {%- if server.enabled %}
11
12 include:
13   - opendaylight.config
14   - opendaylight.repo
15
16 {%- if grains['saltversioninfo'] < [2017, 7] %}
17 service.mask:
18   module.run:
19   - m_name: opendaylight
20 {%- else %}
21 opendaylight_service_mask:
22   service.masked:
23   - name: opendaylight
24 {%- endif %}
25   - prereq:
26     - pkg: opendaylight
27
28 {%- if server.cluster_enabled %}
29 configure_cluster:
30   cmd.run:
31   - name: /opt/opendaylight/bin/configure-cluster-ipdetect.sh {{ server.seed_nodes_list }}
32   - require:
33     - pkg: opendaylight
34 {%- endif %}
35
36 opendaylight:
37   pkg.installed:
38   - names: {{ server.pkgs }}
39   - require:
40     - sls: opendaylight.repo
41   - require_in:
42     - sls: opendaylight.config
43   service.running:
44   - enable: true
45 {%- if grains['saltversioninfo'] >= [2017, 7] %}
46   - unmask: true
47 {%- endif %}
48   - watch:
49     - sls: opendaylight.config
50
51 {%- endif %}