1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2024-11-25 01:48:55 +00:00
⚙️ A GitHub Action for running Ansible playbooks
Find a file
Dawid Dziurla fbcc2c2bae
main: fix
2021-07-26 20:45:05 +02:00
.github workflows: test sudo 2021-07-26 18:29:42 +02:00
node_modules package: add yaml 2020-12-09 11:56:40 +01:00
test put test stuff intooo... test/ dir 2021-02-11 17:28:46 +01:00
action.yml Add sudo option for root access (#16) 2021-07-19 17:49:48 +02:00
LICENSE init 2020-03-21 17:06:40 +01:00
main.js main: fix 2021-07-26 20:45:05 +02:00
package-lock.json build(deps): bump @actions/core from 1.2.6 to 1.2.7 2021-04-14 04:54:38 +00:00
package.json build(deps): bump @actions/core from 1.2.6 to 1.2.7 2021-04-14 04:54:38 +00:00
post.js Add support for SSH Host Key Checking 2021-04-04 16:51:46 -04:00
README.md README: update 2021-07-26 18:46:29 +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: .known_hosts
    # 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