https://github.com/alex-oleshkevich/ansible-playbook
Run Ansible playbooks
https://github.com/alex-oleshkevich/ansible-playbook
Last synced: about 2 months ago
JSON representation
Run Ansible playbooks
- Host: GitHub
- URL: https://github.com/alex-oleshkevich/ansible-playbook
- Owner: alex-oleshkevich
- License: mit
- Created: 2024-04-26T20:01:32.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-26T20:57:30.000Z (about 1 year ago)
- Last Synced: 2025-01-24T16:44:39.345Z (3 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-playbook
A GitHub Workflow action to run Ansible playbooks.# Usage
```yaml
jobs:
test:
runs-on: ubuntu-latest
steps:- name: "Apply playbook"
uses: alex-oleshkevich/ansible-playbook@VERSION
with:
inventory-file: "assets/inventory.ini"
playbook-file: "assets/playbook.yml"
private-key: |
-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
become-password: "password"
become-user: "root"
become-method: "sudo"
tags: >-
tag1
tag2
skip-tags: >-
tag3
tag4
vault-password: "vault_password"
check-only: "true"
user: "user"
debug: "true"
extra_variables: >-
key1=value1
key2=value2
options: "--verbose -T 20"- name: "Print Ansible version"
run: ansible-playbook --version
```Note on multiline strings. We don't support new line characters. Using new line characters, for example, in `extra_variables` will cause error.
```yaml
# don'textra_variables: |
key1=value1
key2=value2# do
extra_variables: >-
key1=value1
key2=value2extra_variables: key1=value1 key2=value2
```