Skip to content

Instantly share code, notes, and snippets.

@marshyski
Last active October 15, 2015 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshyski/8407279427ae10773f76 to your computer and use it in GitHub Desktop.
Save marshyski/8407279427ae10773f76 to your computer and use it in GitHub Desktop.
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