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
f2818df92e
commit
59682bbe12
6
main.js
6
main.js
@ -16,6 +16,7 @@ async function main() {
|
|||||||
const options = core.getInput("options")
|
const options = core.getInput("options")
|
||||||
const sudo = core.getInput("sudo")
|
const sudo = core.getInput("sudo")
|
||||||
const noColor = core.getInput("no_color")
|
const noColor = core.getInput("no_color")
|
||||||
|
const limit = core.getInput("limit")
|
||||||
|
|
||||||
let cmd = ["ansible-playbook", playbook]
|
let cmd = ["ansible-playbook", playbook]
|
||||||
|
|
||||||
@ -50,6 +51,11 @@ 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