mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-11-25 01:48:55 +00:00
main: simplify known hosts logic
This commit is contained in:
parent
90a22da2b0
commit
e959e707d3
1 changed files with 1 additions and 8 deletions
9
main.js
9
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"
|
||||
|
|
Loading…
Reference in a new issue