mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-04-20 14:53:34 +00:00
ability to use local inventory file from repo
This commit is contained in:
parent
c4e9ae1206
commit
a4a03e574f
2 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,9 @@ inputs:
|
|||
inventory:
|
||||
description: Custom content to write into hosts
|
||||
required: false
|
||||
localinventory:
|
||||
description: Inventory file from repo
|
||||
required: false
|
||||
vault_password:
|
||||
description: The password used for decrypting vaulted files
|
||||
required: false
|
||||
|
|
5
main.js
5
main.js
|
@ -64,6 +64,11 @@ async function main() {
|
|||
cmd.push(inventoryFile)
|
||||
}
|
||||
|
||||
if(localinventory) {
|
||||
cmd.push("--inventory-file")
|
||||
cmd.push(localinventory)
|
||||
}
|
||||
|
||||
if (vaultPassword) {
|
||||
const vaultPasswordFile = ".ansible_vault_password"
|
||||
fs.writeFileSync(vaultPasswordFile, vaultPassword, { mode: 0600 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue