Skip to content

ci: ansible

ci: ansible #13

Workflow file for this run

name: ansible
on:
pull_request:
push:
workflow_dispatch:
jobs:
run:
name: ansible
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install deps
run: |
sudo apt install -y age python3-paramiko
curl -LO https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.amd64
sudo mv sops-v3.9.0.linux.amd64 /usr/local/bin/sops
sudo chmod +x /usr/local/bin/sops
- name: add age key
run: |
mkdir -p ~/.config/sops/age
echo "${{ secrets.AGE_KEY }}" > ~/.config/sops/age/keys.txt
- name: run ansible
run: |
cp ansible/inventory.example.yml ansible/inventory.yml
ansible-playbook ansible/playbooks/debian.yml \
-i ansible/inventory.yml \
-e _hosts="localhost" \
-e _connection="local" \
-e "ansible_python_interpreter=$(which python3)"