This trick works great, but if you have many hosts in your inventory, you have to be sure the variables used (extra_vars and host inventory vars) are unique on every Custom Credential Type, otherwise they will be overwritten.