diff options
Diffstat (limited to 'mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls')
-rw-r--r-- | mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls new file mode 100644 index 000000000..6e31ffb3f --- /dev/null +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2019 Mirantis Inc. and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +{% from "opendaylight/map.jinja" import server with context %} + +{%- if server.enabled %} + +include: + - opendaylight.config + - opendaylight.repo + +{%- if grains['saltversioninfo'] < [2017, 7] %} +service.mask: + module.run: + - m_name: opendaylight +{%- else %} +opendaylight_service_mask: + service.masked: + - name: opendaylight +{%- endif %} + - prereq: + - pkg: opendaylight + +{%- if server.cluster_enabled %} +configure_cluster: + cmd.run: + - name: /opt/opendaylight/bin/configure-cluster-ipdetect.sh {{ server.seed_nodes_list }} + - require: + - pkg: opendaylight +{%- endif %} + +opendaylight: + pkg.installed: + - names: {{ server.pkgs }} + - require: + - sls: opendaylight.repo + - require_in: + - sls: opendaylight.config + service.running: + - enable: true +{%- if grains['saltversioninfo'] >= [2017, 7] %} + - unmask: true +{%- endif %} + - watch: + - sls: opendaylight.config + +{%- endif %} |