fix(cicd): Disable SSH host key verification for LINSTOR connections
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 17s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 9s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve3 (push) Successful in 1m53s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s

- Ajoute -o StrictHostKeyChecking=no et -o UserKnownHostsFile=/dev/null
- Résout l'erreur 'Host key verification failed'
- Nécessaire car le container Docker n'a pas les clés d'hôtes enregistrées
This commit is contained in:
Tellsanguis 2025-11-27 12:45:59 +01:00
parent 6628870938
commit ddc9b1a98b

View file

@ -67,8 +67,13 @@ class LinstorManager:
remote_host: Si spécifié, exécute la commande via SSH sur cet hôte
"""
if remote_host:
# Construit la commande SSH
ssh_command = ['ssh', f'root@{remote_host}'] + command
# Construit la commande SSH avec options pour désactiver la vérification de clé d'hôte
ssh_command = [
'ssh',
'-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
f'root@{remote_host}'
] + command
self.log(f"Exécution SSH sur {remote_host}: {' '.join(command)}")
command = ssh_command
else: