24 lines
446 B
YAML
24 lines
446 B
YAML
name: Run Ansible Playbook
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
run-ansible:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Decode SSH key
|
|
run: |
|
|
echo "${{ secrets.ANSIBLE_KEY_BASE64 }}" | base64 -d > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
|
|
- name: echo SSH key
|
|
run: |
|
|
ls -la ~/.ssh
|
|
cat ~/.ssh/id_rsa |