From 59b67e27b770c9e51575ca83174da4b72aefcc51 Mon Sep 17 00:00:00 2001 From: jerome Date: Tue, 19 Aug 2025 19:57:02 +0200 Subject: local_script --- final/local_script | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'final/local_script') diff --git a/final/local_script b/final/local_script index 14b6121..8040bb9 100755 --- a/final/local_script +++ b/final/local_script @@ -1,8 +1,9 @@ #!/bin/bash -ssh-keygen -f ~/.ssh/known_hosts -R $1 +#ssh-keygen -f ~/.ssh/known_hosts -R $1 # on attend que cloud-init ait fini d'installer le serveur SSH -while ! ssh-keyscan -H $1 >> ~/.ssh/known_hosts; do - sleep 1 -done -ansible -u ansible --become -i "$1," -m ping all +#while ! ssh-keyscan -H $1 >> ~/.ssh/known_hosts; do +# sleep 1 +#done +#ansible -u ansible --become -i "$1," -m ping all +sed -i "/$2/d" hosts echo $2 ansible_host=$1 ansible_user=ansible ansible_become=true >> hosts -- cgit v1.2.3