Be carefull using the template option.... It looks good at the beginning, however iw you want to change specific items, you can not change it.... Then you have to unbind, and create new one
I have a script which create projects sites....Also includes claiming devices etc etc.... Written in python
If you are interested... contact me .. (bit to big to post here 😉 )
Just saying, if you've got public code that you'd like to share, there are a few ways to do that easily. Github, Gitlab, hosted on a page of your own. Then once you've got it hosted, you can add it to the Devnet Code Exchange.