From e77e174e321172b5a0f5c4a955b305bc36506454 Mon Sep 17 00:00:00 2001 From: Thomas Samson Date: Fri, 22 Sep 2017 17:56:13 +0200 Subject: [PATCH] remove default value for keyfile: ${user} is the remote user, not local --- manifests/get.pp | 6 +++--- manifests/put.pp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/get.pp b/manifests/get.pp index a448124..1c8c395 100644 --- a/manifests/get.pp +++ b/manifests/get.pp @@ -55,13 +55,13 @@ ) { if $keyfile { - $mykeyfile = $keyfile + $mykeyfile = "-i $keyfile" } else { - $mykeyfile = "/home/${user}/.ssh/id_rsa" + $mykeyfile = "" } if $user { - $myuser = "-e 'ssh -i ${mykeyfile} -l ${user}' ${user}@" + $myuser = "-e 'ssh ${mykeyfile} -l ${user}' ${user}@" } else { $myuser = undef } diff --git a/manifests/put.pp b/manifests/put.pp index bede4c7..7fd1d0e 100644 --- a/manifests/put.pp +++ b/manifests/put.pp @@ -40,13 +40,13 @@ ) { if $keyfile { - $mykeyfile = $keyfile + $mykeyfile = "-i $keyfile" } else { - $mykeyfile = "/home/${user}/.ssh/id_rsa" + $mykeyfile = "" } if $user { - $myuseropt = "-e 'ssh -i ${mykeyfile} -l ${user}'" + $myuseropt = "-e 'ssh ${mykeyfile} -l ${user}'" $myuser = "${user}@" } else { $myuseropt = undef