spurin / diveintoansible-lab

Dive Into Ansible Lab
850 stars 531 forks source link

stuck in bash loop #24

Closed Rijo-ru closed 3 years ago

Rijo-ru commented 3 years ago

Hi! After command

for user in ansible root
do 
  for os in ubuntu centos
  do
    for instance in 1 2 3
    do 
    sshpass -f password.txt ssh-copy-id -o StrictHostKeyChecking=no ${user}@${os}${instance}
    done
  done
done

command execution stuck at first iteration image

What's wrong with me? :(

Rijo-ru commented 3 years ago

I missed the command echo password > password.txt After this, all going good

spurin commented 3 years ago

Perfect @Rijo-ru

Glad you've resolved this 👍

Rijo-ru commented 3 years ago

echo password > password.txt