Skip to content

Commit

Permalink
Ensure databases repositories use correct SSH key
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Feb 20, 2024
1 parent 1e8b5f9 commit d9e05e6
Showing 1 changed file with 7 additions and 0 deletions.
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 }} to use the GitHub 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 d9e05e6

Please sign in to comment.