make package 'ensure' variable, with 'present' as default
sort hashes to prevent shuffling and restarting ssh unnecessarily
change parameter order
fix conflicts