mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-09-05 08:25:46 -06:00
ability to use local inventory file from repo
This commit is contained in:
parent
c4e9ae1206
commit
a4a03e574f
@ -19,6 +19,9 @@ inputs:
|
|||||||
inventory:
|
inventory:
|
||||||
description: Custom content to write into hosts
|
description: Custom content to write into hosts
|
||||||
required: false
|
required: false
|
||||||
|
localinventory:
|
||||||
|
description: Inventory file from repo
|
||||||
|
required: false
|
||||||
vault_password:
|
vault_password:
|
||||||
description: The password used for decrypting vaulted files
|
description: The password used for decrypting vaulted files
|
||||||
required: false
|
required: false
|
||||||
|
5
main.js
5
main.js
@ -64,6 +64,11 @@ async function main() {
|
|||||||
cmd.push(inventoryFile)
|
cmd.push(inventoryFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(localinventory) {
|
||||||
|
cmd.push("--inventory-file")
|
||||||
|
cmd.push(localinventory)
|
||||||
|
}
|
||||||
|
|
||||||
if (vaultPassword) {
|
if (vaultPassword) {
|
||||||
const vaultPasswordFile = ".ansible_vault_password"
|
const vaultPasswordFile = ".ansible_vault_password"
|
||||||
fs.writeFileSync(vaultPasswordFile, vaultPassword, { mode: 0600 })
|
fs.writeFileSync(vaultPasswordFile, vaultPassword, { mode: 0600 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user