puppetlabs/vcsrepo git submodule update without exec
Looking for a better way to update a git submodule using the puppetlabs/vcsrepo module.
Using a (ops-maintained) git repo for puppet files in /etc/puppetlabs/puppet, and a (dev-maintained) submodule in /etc/puppetlabs/puppet/files/appconf.
The following is written to use a submodule, but using exec seems like a kludge.
vcsrepo { '/etc/puppetlabs/puppet/':
ensure => latest,
user => $username,
provider => git,
require => [ Package["git"] ],
source => "git@git.mydomain.com:${repo}.git",
revision => 'master',
}
->
exec { '/usr/bin/git submodule init':
cwd => '/etc/puppetlabs/puppet',
}
->
exec { '/usr/bin/git submodule update':
cwd => '/etc/puppetlabs/puppet',
}
Thanks!
-s