-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1007 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 -vvv