[lib] deployment: add a test before to update the hosts state