Getting the number of workers from the ansible_processor fact which is a list that corresponds to the number of physical + virtual(hypearthreaded) cores.