fixed local inventory name

This commit is contained in:
Mindaugas Žvirblis 2022-07-05 09:55:22 +03:00
parent a4a03e574f
commit ae4fda9675
No known key found for this signature in database
GPG Key ID: 31926D23B5D70A97
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,7 @@ inputs:
inventory: inventory:
description: Custom content to write into hosts description: Custom content to write into hosts
required: false required: false
localinventory: local_inventory:
description: Inventory file from repo description: Inventory file from repo
required: false required: false
vault_password: vault_password:

View File

@ -17,6 +17,7 @@ async function main() {
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") const limit = core.getInput("limit")
const local_inventory = core.getInput("local_inventory")
let cmd = ["ansible-playbook", playbook] let cmd = ["ansible-playbook", playbook]
@ -64,9 +65,9 @@ async function main() {
cmd.push(inventoryFile) cmd.push(inventoryFile)
} }
if(localinventory) { if(local_inventory) {
cmd.push("--inventory-file") cmd.push("--inventory-file")
cmd.push(localinventory) cmd.push(local_inventory)
} }
if (vaultPassword) { if (vaultPassword) {