Israel's military chief has indicated that the army was preparing for a potential ground invasion into Lebanon, as thousands of troops gathered at the border.