testStr #265
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Action entrypoints | |
on: | |
push: | |
branches: [main] | |
jobs: | |
# INSTALLATION OF ANSIBLE AND PFSENSE's MODULE | |
ansible-install: | |
runs-on: self-hosted | |
steps: | |
- name: Ansible installation | |
run: | | |
sudo apt-get update | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository --yes --update ppa:ansible/ansible -y | |
sudo apt install ansible -y | |
sudo apt install ansible-core -y | |
sudo ansible-galaxy collection install pfsensible.core | |
shell: bash | |
# ANSIBLE PLAYBOOK RUNNER | |
ansible: | |
needs: ansible-install | |
defaults: | |
run: | |
working-directory: ./ansible/ | |
runs-on: self-hosted | |
steps: | |
- name: Setup checkout environment | |
uses: actions/checkout@v3 | |
# TO RUN THIS COMMAND : YOU NEED INSTALLATION OF --> ansible and pfsensible module ON THE RUNNER | |
- name: Run Ansible playbook | |
run: | | |
ansible-playbook -i inventory.yml playbook.yml |