Error while using Yum install packages on existing rhel template on VMware

Hi team, we are facing issues provisioning the rhel VM in Vmware environment using the existing template.
here are list of tasks we are performing
– provisioning the rhel Vm using existing template used vmware_guest module
– wait for the VM to be reachable
– set the environment variables
– yum install httpd,gcc,php, mysql related packages
– copy the files to /var/www on destination VM
– restart the httpd server

we are facing issues at yum install with repo issues.