⚙️ A GitHub Action for running Ansible playbooks
Go to file
dependabot[bot] 260ab3adce
build(deps): bump yaml from 2.3.1 to 2.3.2 (#81)
Bumps [yaml](https://github.com/eemeli/yaml) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 08:23:49 +02:00
.github build(deps): bump actions/checkout from 2 to 3 (#37) 2022-04-19 19:30:40 +02:00
node_modules node_modules: upgrade 2022-10-21 16:44:44 +02:00
test put test stuff intooo... test/ dir 2021-02-11 17:28:46 +01:00
action.yml Use node16 (#62) 2022-10-15 09:24:02 +02:00
LICENSE init 2020-03-21 17:06:40 +01:00
main.js Add ability to turn off colored output (#32) 2021-08-01 17:03:21 +02:00
package-lock.json build(deps): bump yaml from 2.3.1 to 2.3.2 (#81) 2023-08-29 08:23:49 +02:00
package.json build(deps): bump yaml from 2.3.1 to 2.3.2 (#81) 2023-08-29 08:23:49 +02:00
post.js post: remove arrow 2022-09-01 08:37:48 +02:00
README.md Update know_host example (#71) 2023-04-06 09:11:50 +02:00

Run Ansible playbook GitHub Action

An Action that executes given Ansible playbook on selected hosts.

Should work on any OS, if ansible-playbook command is available in PATH.

Usage

- name: Run playbook
  uses: dawidd6/action-ansible-playbook@v2
  with:
    # Required, playbook filepath
    playbook: deploy.yml
    # Optional, directory where playbooks live
    directory: ./
    # Optional, SSH private key
    key: ${{secrets.SSH_PRIVATE_KEY}}
    # Optional, literal inventory file contents
    inventory: |
      [all]
      example.com

      [group1]
      example.com      
    # Optional, SSH known hosts file content
    known_hosts: |
      example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl      
    # Optional, encrypted vault password
    vault_password: ${{secrets.VAULT_PASSWORD}}
    # Optional, galaxy requirements filepath
    requirements: galaxy-requirements.yml
    # Optional, additional flags to pass to ansible-playbook
    options: |
      --inventory .hosts
      --limit group1
      --extra-vars hello=there
      --verbose