function copy-ssh-keys-to-slave() {
RETRIES=60
for j in $(seq 1 $RETRIES); do
+ # shellcheck disable=SC2092
if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
ssh "jenkins@${i}" 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
echo "Successfully copied public keys to slave ${i}"