-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27c9846
commit 27faeec
Showing
3 changed files
with
56 additions
and
50 deletions.
There are no files selected for viewing
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
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)" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.