diff options
author | 2024-04-14 21:30:43 +0200 | |
---|---|---|
committer | 2024-04-15 15:01:37 +0200 | |
commit | 3516f01759dd9136069dc81cdd01cfba2ca7eb00 (patch) | |
tree | 5f27a66ed9501baeb79d065ac603b2024ec929ba | |
parent | Update vars to have the role name as a prefix (diff) |
Use Ansible Vault for storing users
Closes #211.
-rw-r--r-- | .github/workflows/lint-ansible.yaml | 1 | ||||
-rw-r--r-- | ansible/.gitattributes | 2 | ||||
-rw-r--r-- | ansible/README.md | 2 | ||||
-rw-r--r-- | ansible/roles/pydis-users/vars/main.yml | bin | 1011 -> 4307 bytes |
4 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/lint-ansible.yaml b/.github/workflows/lint-ansible.yaml index 5359008..217967b 100644 --- a/.github/workflows/lint-ansible.yaml +++ b/.github/workflows/lint-ansible.yaml @@ -22,7 +22,6 @@ jobs: run: | cd ansible echo "$VAULT_PASSWORD" > vault_passwords - grep -R GITCRYPT --files-with-matches . | xargs rm ansible-lint --offline env: VAULT_PASSWORD: "${{ secrets.vault-password }}" diff --git a/ansible/.gitattributes b/ansible/.gitattributes index 923ae1a..0a0fb7e 100644 --- a/ansible/.gitattributes +++ b/ansible/.gitattributes @@ -1 +1 @@ -roles/pydis-users/vars/main.yml filter=git-crypt diff=git-crypt +roles/pydis-users/vars/main.yml diff=ansible-vault merge=binary diff --git a/ansible/README.md b/ansible/README.md index b823e56..29d6e63 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -15,3 +15,5 @@ To setup a local environment using VMs for testing, [Read here](./local_testing/ 1. Install project dependencies: `python -m pip install -r requirements.txt` 1. Install the pre-commit hook: `pre-commit install` 1. Create a `vault_passwords` file and write the vault password to it +1. Configure the Ansible Vault git diff driver using `git config --global + diff.ansible-vault.textconv "ansible-vault view"` and `git config diff.ansible-vault.cachetextconv false` diff --git a/ansible/roles/pydis-users/vars/main.yml b/ansible/roles/pydis-users/vars/main.yml Binary files differindex ef918e6..ff8784c 100644 --- a/ansible/roles/pydis-users/vars/main.yml +++ b/ansible/roles/pydis-users/vars/main.yml |