I don't quite understand how to pass SSH key using vcsrepo module (called "deployment" SSH key in Bitbucket terminology, which only allow Read).
Also there is an aspect that inside git repo "terraform" structure is:
• "name_of_the_repo/aws-backup/scripts/backup"
• "name_of_the_repo/aws-backup/scripts/restore"
And i need to place those files to:
• /opt/username/scripts/backup
• /opt/username/scripts/restore
So seems that some sort of "post-processing" is needed in one way or another to checkout only needed folders from git and place them into proper directory.
In README to vcsrepo module such features only for SVN repo, not git repo.
So my thinking process circles back to idea of just running "git clone & git pull" on Puppet server via cron job, and then use this folder as "Fileserver" as source to distribute scripts to target nodes.
This way only 1 git checkout will be needed instead of hundreds of VMs doing it periodically
It will work, i guess i will have to stick to this method (?)