1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2025-04-20 06:43:34 +00:00

Update main.js

This commit is contained in:
M 2022-07-01 21:43:08 +03:00 committed by GitHub
parent 3c5278f421
commit c4e9ae1206
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

10
main.js
View file

@ -24,6 +24,11 @@ async function main() {
cmd.push(options.replace(/\n/g, " "))
}
if(limit) {
cmd.push("--limit")
cmd.push(limit)
}
if (directory) {
process.chdir(directory)
core.saveState("directory", directory)
@ -51,11 +56,6 @@ async function main() {
cmd.push(keyFile)
}
if(limit) {
cmd.push("--limit");
cmd.push(limit);
}
if (inventory) {
const inventoryFile = ".ansible_inventory"
fs.writeFileSync(inventoryFile, inventory, { mode: 0600 })