Skip to content

Commit

Permalink
ci: ansible setup ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
labasubagia committed Jul 19, 2024
1 parent 27c9846 commit 27faeec
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/absible-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Ansible Setup Ubuntu
on:
pull_request:
paths: ansible/**
push:
paths: ansible/**
workflow_dispatch:

jobs:
lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main

run:
name: Setup Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
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: Pre setup
run: cp ansible/inventory.example.yml ansible/inventory.yml

- name: Setup install
run: |
ansible-playbook ansible/playbooks/debian.yml \
-i ansible/inventory.yml \
-e _hosts="localhost" \
-e _connection="local" \
-e '{"is_remove": false}' \
-e "ansible_python_interpreter=$(which python3)"
- name: Setup remove
run: |
ansible-playbook ansible/playbooks/debian.yml \
-i ansible/inventory.yml \
-e _hosts="localhost" \
-e _connection="local" \
-e '{"is_remove": true}' \
-e "ansible_python_interpreter=$(which python3)"
34 changes: 0 additions & 34 deletions .github/workflows/absible.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/ansible-lint.yml

This file was deleted.

0 comments on commit 27faeec

Please sign in to comment.