X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fpatches%2F0004-maas-region-use-authorized_keys-1st-entry.patch;h=a4fb44b056ac8b80f8a559abf8cd6498321ed240;hb=a1c323835f808e6d729c645c8df75a43e51851fe;hp=b7322e3d2c6b874affaf10f1ddf5f0508fafc0d0;hpb=80757cccc9e6e3edefc6fa4562d22321486e8ec8;p=fuel.git diff --git a/mcp/patches/0004-maas-region-use-authorized_keys-1st-entry.patch b/mcp/patches/0004-maas-region-use-authorized_keys-1st-entry.patch index b7322e3d2..a4fb44b05 100644 --- a/mcp/patches/0004-maas-region-use-authorized_keys-1st-entry.patch +++ b/mcp/patches/0004-maas-region-use-authorized_keys-1st-entry.patch @@ -1,3 +1,11 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Mirantis Inc., Enea AB 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: Charalampos Kominos Date: Sat, 5 Aug 2017 02:03:01 +0200 Subject: [PATCH] maas: region: use authorized_keys 1st entry @@ -12,12 +20,13 @@ Signed-off-by: Charalampos Kominos --- diff --git a/maas/region.sls b/maas/region.sls -index d3227ca..8a2243d 100644 --- a/maas/region.sls +++ b/maas/region.sls -@@ -179,8 +179,14 @@ +@@ -242,12 +242,16 @@ + - require: - module: maas_config +-{%- if region.get('sshprefs', False) %} maas_sshprefs: - module.run: - - name: maas.process_sshprefs @@ -27,8 +36,10 @@ index d3227ca..8a2243d 100644 +# - name: maas.process_sshprefs +# - require: + cmd.run: -+ - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && SSH_KEY=$(cat authorized_keys | head -1) && maas opnfv sshkeys create \"key=$SSH_KEY\"" ++ - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && SSH_KEY=$(cat authorized_keys | head -1) && (maas opnfv sshkeys read | grep -q \"$SSH_KEY\" || maas opnfv sshkeys create \"key=$SSH_KEY\")" + - cwd: "/home/ubuntu/.ssh" - require: - module: maas_config +-{%- endif %} + {%- endif %}