mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-09-05 08:25:46 -06:00
Update main.js
This commit is contained in:
parent
3c5278f421
commit
c4e9ae1206
10
main.js
10
main.js
@ -24,6 +24,11 @@ async function main() {
|
|||||||
cmd.push(options.replace(/\n/g, " "))
|
cmd.push(options.replace(/\n/g, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(limit) {
|
||||||
|
cmd.push("--limit")
|
||||||
|
cmd.push(limit)
|
||||||
|
}
|
||||||
|
|
||||||
if (directory) {
|
if (directory) {
|
||||||
process.chdir(directory)
|
process.chdir(directory)
|
||||||
core.saveState("directory", directory)
|
core.saveState("directory", directory)
|
||||||
@ -51,11 +56,6 @@ async function main() {
|
|||||||
cmd.push(keyFile)
|
cmd.push(keyFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(limit) {
|
|
||||||
cmd.push("--limit");
|
|
||||||
cmd.push(limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inventory) {
|
if (inventory) {
|
||||||
const inventoryFile = ".ansible_inventory"
|
const inventoryFile = ".ansible_inventory"
|
||||||
fs.writeFileSync(inventoryFile, inventory, { mode: 0600 })
|
fs.writeFileSync(inventoryFile, inventory, { mode: 0600 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user