Aims of Ayurveda & Yoga are same ie. Attainment of salvation.
Health is a main root through which, one can acieve salvation. In Caraka samhita, Sarira sthana vast references of yoga is available.
Recurrence of all feeling are blocked through yoga & moksa. The complete eradication of feelings are attained through yoga & moksa. The complete eradication of feelings are attained through moksa. Yoga is a means to attain moksa (salvation).
Impairment of intellect, endurance & memory, effect of maturity of time & action & unwholesome contact with objects with sense organs are considered to be the causative factors for unhappiness.