Skip to content

Instantly share code, notes, and snippets.

@marshyski
Last active Oct 15, 2015
Embed
What would you like to do?
Puppet VCS example
class yum_nginx_api (
$git_ver = 'latest',
$git_dir = '/opt/yum-nginx-api',
) {
# Install git client
package { 'git':
ensure => $git_ver,
}
# Install git repo into directory
vcsrepo { $git_dir:
ensure => latest,
provider => git,
source => 'https://github.com/FINRAOS/yum-nginx-api.git',
revision => 'master',
require => Package['git'],
}
# Set permissions and ownership of directory
file { $git_dir:
ensure => directory,
owner => root,
group => root,
mode => '0755',
require => Vcsrepo["$git_dir"],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment