aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2019-02-08 13:39:16 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2019-02-08 14:05:06 +0400
commitfd062566e46b4c28415a955616564adfeb5e1888 (patch)
tree3fc0d447be7b853aaa4111c0a053a20a184019ee
parent96ff5d47f665c226cc39e22236696ff6b5dc30cf (diff)
[odl] Settle the broken pkg->config dependency
Change-Id: I3bbe3e4be520ccac198654bb4a7d493aa8450023 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/repo.sls56
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls53
2 files changed, 60 insertions, 49 deletions
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/repo.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/repo.sls
new file mode 100644
index 000000000..175108ef3
--- /dev/null
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/repo.sls
@@ -0,0 +1,56 @@
+##############################################################################
+# 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 %}
+
+# NOTE: starting with Salt 2018.3, key_text might be used instead
+opendaylight_repo_key:
+ # Launchpad PPA for ODL Team
+ # pub 4096R/44C05248 2017-01-26
+ cmd.run:
+ - name: |
+ cat <<-EOF | sudo apt-key add -
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ Version: GnuPG v1
+
+ mQINBFiKaBEBEADpCtIj8utf/bUfN6iQ+sxGiOPLnXVYoYyKifHDazD4o1Jevfiu
+ EpcDIx9EdnhrCpvKTU+jaw2B7K3pkdqbjbzjZY+2CDENSQXfRHuuI/nWDaYI0stx
+ Tf/evip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pMDHuHapyH8iaUoksq7gd64iBRDJQN7giQSjkTVvcGBqoKG8lbUMV
+ MDT4FGuYYsObWUg7kmHlNq9nIVlAxmxv8ZTg9+8xy3f53aId/51m+gW9LGRAT94T
+ ZIWrF9cBvsPWoHgHkV1At/fPprOvNXqeQiJ7UzC3ikDNCu2AjPEbA4sb019RNgtj
+ jUI6g6RZdzbeKVpptxILCtT3yKbfKj8AfrfaRzS0yMhVudgLolIUA4S6g46p0Cgy
+ gITO49wxxBu6UAOsAG3psDRlsZmmrT4AH09Yt2RzmY0FBWValqpoPagheQqeU+2W
+ FKnV9Lw1SKMtWZbYMvIlB0rwts3k9lE=
+ =xkZ9
+ -----END PGP PUBLIC KEY BLOCK-----
+ EOF
+ - unless: apt-key list | grep -qF '4096R/44C05248 2017-01-26'
+
+opendaylight_repo:
+ pkgrepo.managed:
+ # NOTE(armband): PPA handling behind proxy broken, define it explicitly
+ # https://github.com/saltstack/salt/pull/45224
+ # - ppa: {{ server.repo }}
+ - human_name: opendaylight-ppa
+ - name: deb http://ppa.launchpad.net/odl-team/{{ server.version }}/ubuntu xenial main
+ - file: /etc/apt/sources.list.d/odl-team-ubuntu-{{ server.version }}-xenial.list
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
index d150e78a4..6e31ffb3f 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
@@ -11,54 +11,7 @@
include:
- opendaylight.config
-
-# NOTE: starting with Salt 2018.3, key_text might be used instead
-opendaylight_repo_key:
- # Launchpad PPA for ODL Team
- # pub 4096R/44C05248 2017-01-26
- cmd.run:
- - name: |
- cat <<-EOF | sudo apt-key add -
- -----BEGIN PGP PUBLIC KEY BLOCK-----
- Version: GnuPG v1
-
- mQINBFiKaBEBEADpCtIj8utf/bUfN6iQ+sxGiOPLnXVYoYyKifHDazD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2ImhpwOcuazKTe/q2ZhoPTpYvuzmogwau8LBjRBhVS6fkTpSBPEkcwn
- f/QYmmVLygmpMDHuHapyH8iaUoksq7gd64iBRDJQN7giQSjkTVvcGBqoKG8lbUMV
- MDT4FGuYYsObWUg7kmHlNq9nIVlAxmxv8ZTg9+8xy3f53aId/51m+gW9LGRAT94T
- ZIWrF9cBvsPWoHgHkV1At/fPprOvNXqeQiJ7UzC3ikDNCu2AjPEbA4sb019RNgtj
- jUI6g6RZdzbeKVpptxILCtT3yKbfKj8AfrfaRzS0yMhVudgLolIUA4S6g46p0Cgy
- gITO49wxxBu6UAOsAG3psDRlsZmmrT4AH09Yt2RzmY0FBWValqpoPagheQqeU+2W
- FKnV9Lw1SKMtWZbYMvIlB0rwts3k9lE=
- =xkZ9
- -----END PGP PUBLIC KEY BLOCK-----
- EOF
- - unless: apt-key list | grep -qF '4096R/44C05248 2017-01-26'
-
-opendaylight_repo:
- pkgrepo.managed:
- # NOTE(armband): PPA handling behind proxy broken, define it explicitly
- # https://github.com/saltstack/salt/pull/45224
- # - ppa: {{ server.repo }}
- - human_name: opendaylight-ppa
- - name: deb http://ppa.launchpad.net/odl-team/{{ server.version }}/ubuntu xenial main
- - file: /etc/apt/sources.list.d/odl-team-ubuntu-{{ server.version }}-xenial.list
+ - opendaylight.repo
{%- if grains['saltversioninfo'] < [2017, 7] %}
service.mask:
@@ -84,7 +37,9 @@ opendaylight:
pkg.installed:
- names: {{ server.pkgs }}
- require:
- - pkgrepo: opendaylight_repo
+ - sls: opendaylight.repo
+ - require_in:
+ - sls: opendaylight.config
service.running:
- enable: true
{%- if grains['saltversioninfo'] >= [2017, 7] %}