diff options
Diffstat (limited to '_support/terraform/roles/deploy/handlers/main.yml')
-rw-r--r-- | _support/terraform/roles/deploy/handlers/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_support/terraform/roles/deploy/handlers/main.yml b/_support/terraform/roles/deploy/handlers/main.yml new file mode 100644 index 000000000..d2d7522d2 --- /dev/null +++ b/_support/terraform/roles/deploy/handlers/main.yml @@ -0,0 +1,12 @@ +- name: scan SSH keys + command: "ssh-keyscan {{ item }}" + register: ssh_keys + with_items: "{{ tfstate.outputs.gitaly_ssh_ip.value.values() | list + tfstate.outputs.praefect_ssh_ip.value.values() | list + [tfstate.outputs.gitlab_external_ip.value] }}" + listen: add hostkeys + +- name: add SSH keys to known hosts + known_hosts: + name: "{{ item.item }}" + key: "{{ item.stdout }}" + with_items: "{{ ssh_keys.results }}" + listen: add hostkeys |