I am trying to automate the r10k deployment using git hooks. I am making changes on local system and pushing to remote git repository. I want that r10k should auto deploy once the changes are pushed . So i wrote the post-receive hook on puppet master which has following script
#!/bin/sh
echo "Deploying r10k new changes received"
/usr/local/rvm/gems/ruby-2.4.4/bin/r10k depoly environment -pv debug
I made that hook executable but still its not getting invoked when i push from my local machine.
Below is my r10k config file:
---
:cachedir: /opt/puppetlabs/puppet/cache/r10k
:sources:
puppet:
basedir: /etc/puppetlabs/code/environments
remote: https://github.com/Sanket-Shirode/puppet-control.git
For the hooks to work i had to create my own git server.