dawidd6 / action-ansible-playbook

:gear: A GitHub Action for running Ansible playbooks
MIT License
306 stars 68 forks source link

Install playbook requirements #12

Closed fooock closed 3 years ago

fooock commented 3 years ago

I want to use your action but I need to install my playbook requirements first in order to make it work. I think that currently is not possible (I don't see any reference to it in the action.yml).

An approach can be:

- name: Execute playbook
   uses: dawidd6/action-ansible-playbook@v2
   with:
     playbook: playbook.yml
     requirements: requirements.yml

If the requirements field is present, then first it tries to download all required roles/collections and then execute the playbook. What do you think?

Nice work!

dawidd6 commented 3 years ago

Please open a pull request for that.