From: Michael Polenchuk Date: Mon, 21 Aug 2017 16:36:14 +0000 (+0400) Subject: Cleanup outdated salt keys X-Git-Tag: opnfv-5.0.RC1~126 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F39805%2F1;p=fuel.git Cleanup outdated salt keys Remove keys that are left over from the previous deployment to avoid interfere with the new ones. Change-Id: I0dfa9782cbce9a8e8b7c1efe5954c8ffe85996f9 Signed-off-by: Michael Polenchuk --- diff --git a/mcp/config/states/maas b/mcp/config/states/maas index 0c016170c..73deb48c0 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -29,6 +29,9 @@ salt -C 'mas01*' state.apply maas.machines wait_for "salt 'mas01*' --out yaml state.apply maas.machines.status | " \ "tee /dev/stderr | fgrep -q 'Ready: 5'" +# cleanup outdated salt keys +salt-key --out yaml | awk '!/^(minions|- cfg01|- mas01)/ {print $2}' | xargs -I{} salt-key -yd {} + # MaaS node deployment salt -C 'mas01*' state.apply maas.machines.deploy wait_for "salt 'mas01*' --out yaml state.apply maas.machines.status | " \