Skip to content

Commit

Permalink
Add requirements.yml and galaxy command to readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stilktf committed Sep 29, 2024
1 parent 680d747 commit 9e8dacd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@ jobs:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Create vault_pass file
env:
VAULT_PASS: ${{ secrets.VAULT_PASSWORD }}
run: |
touch .vault_pass
echo $VAULT_PASS >> .vault_pass
shell: bash

- name: Install Ansible
shell: bash
run: |
sudo apt update
sudo apt install -y ansible
- name: Install roles from Galaxy
shell: bash
run : |
ansible-galaxy install -r roles/requirements.yml -p roles/galaxy
- name: Run ansible-lint
uses: ansible/ansible-lint@main
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vault_pass
.vault_pass
roles/galaxy
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ ansible playbooks etc for my Raspberry Pi tiny server thing

not *everything* has been turned into a playbook yet

## Roles
This project uses roles from Ansible Galaxy. To install the required roles, please run the following command:

```
ansible-galaxy install -r roles/requirements.yml -p roles/galaxy
```

``roles/galaxy`` is in ``.gitignore``, so it won't be commited to version control.

## Ansible vault

This uses Ansible Vault. Create a file called *.vault_pass*, and put in the vaults password in the file. Then, you can run playbooks that require some variable from the Vault without being nagged about the vault's password each time.
Expand Down
2 changes: 2 additions & 0 deletions roles/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
- src: borgbase.ansible_role_borgbackup

0 comments on commit 9e8dacd

Please sign in to comment.