Evite os caracteres de espaço para uma declaração
servername="$1"
em vez de
servername = $1
function removeDependency {
servername="$1"
sshpass -p password ssh servername 'bash -s' < remove_dependency.sh
}
function execute {
task="$1"
servername="$2"
"$task" "$servername"
}
function installDependency {
servername="$1"
sshpass -p password ssh servername 'bash -s' < install_dependency.sh
}
execute "removeDependency" "server1"