mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2026-01-11 14:01:41 -07:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03f941b221 | ||
|
|
f0b38f33e9 | ||
|
|
75ae627236 | ||
|
|
69990b93b4 | ||
|
|
3c219bf69c |
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
open-pull-requests-limit: 10
|
||||
@@ -28,6 +28,9 @@ inputs:
|
||||
options:
|
||||
description: Extra options that should be passed to ansible-playbook command
|
||||
required: false
|
||||
sudo:
|
||||
description: Set to "true" if root is required for running your playbook
|
||||
required: false
|
||||
runs:
|
||||
using: node12
|
||||
main: main.js
|
||||
|
||||
6
main.js
6
main.js
@@ -14,6 +14,7 @@ async function main() {
|
||||
const vaultPassword = core.getInput("vault_password")
|
||||
const knownHosts = core.getInput("known_hosts")
|
||||
const options = core.getInput("options")
|
||||
const sudo = core.getInput("sudo")
|
||||
|
||||
let cmd = ["ansible-playbook", playbook]
|
||||
|
||||
@@ -81,10 +82,13 @@ async function main() {
|
||||
process.env.ANSIBLE_HOST_KEY_CHECKING = "False"
|
||||
}
|
||||
|
||||
if (sudo) {
|
||||
cmd.unshift("sudo")
|
||||
}
|
||||
|
||||
process.env.ANSIBLE_FORCE_COLOR = "True"
|
||||
|
||||
await exec.exec(cmd.join(' '))
|
||||
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -5,15 +5,15 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/core": "^1.2.7",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"yaml": "^1.10.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
||||
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
|
||||
"integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig=="
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "1.0.4",
|
||||
@@ -39,9 +39,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
||||
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
|
||||
"integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig=="
|
||||
},
|
||||
"@actions/exec": {
|
||||
"version": "1.0.4",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "action-ansible-playbook",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/core": "^1.2.7",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"yaml": "^1.10.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user