From e959e707d3d2edcd44d59a3f33db958964bbd434 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 26 Jul 2021 20:24:44 +0200 Subject: [PATCH] main: simplify known hosts logic --- main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.js b/main.js index ce4f993..a7a8569 100644 --- a/main.js +++ b/main.js @@ -69,14 +69,7 @@ async function main() { const knownHostsFile = ".ansible_known_hosts" fs.writeFileSync(knownHostsFile, knownHosts, { mode: 0600 }) core.saveState("knownHostsFile", knownHostsFile) - let known_hosts_param = [ - "--ssh-common-args=", - "\"", - "-o UserKnownHostsFile=", - knownHostsFile, - "\"" - ].join('') - cmd.push(known_hosts_param) + cmd.push("--ssh-common-args", `-o UserKnownHostsFile=${knownHostsFile}`) process.env.ANSIBLE_HOST_KEY_CHECKING = "True" } else { process.env.ANSIBLE_HOST_KEY_CHECKING = "False"