Skip to content

Commit

Permalink
Ensure databases repositories use correct SSH key (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt authored Feb 20, 2024
2 parents 1e8b5f9 + 3aa6a8e commit aabb28c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Unreleased [patch]

_Full changeset and discussions: [#32](https://github.com/OpenTermsArchive/deployment/pull/32)._

> Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs.
### Fixed

- Ensure snapshots and versions repositories use correct SSH key

## 0.1.0 - 2024-02-20

Expand Down
7 changes: 7 additions & 0 deletions roles/engine/tasks/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
key_file: '/home/{{ ansible_user }}/.ssh/ota-github-bot-key'
when: existing_repository.before is defined and not existing_repository.before # if existing_repository.before is null, then the repository is new

- name: Configure {{ engine_database_name }} repository to use the GitHub Bot SSH Key
ansible.builtin.git_config:
name: core.sshCommand
value: ssh -i '/home/{{ ansible_user }}/.ssh/ota-github-bot-key'
scope: local
repo: '{{ engine_database_directory }}'

- name: Remove existing locks in {{ engine_database_name }}
ansible.builtin.file:
path: '{{ engine_database_directory }}/.git/index.lock'
Expand Down

0 comments on commit aabb28c

Please sign in to comment.