if [[ "$templatesource" == *windows* ]]; then partition=/dev/sda2 fi
The * before and after * windows will match this "Ihavelotsofwindowshere"
Of we could have used "windows*" and anything that starts with "windows" will be matched etc...