Last active
October 15, 2015 06:08
-
-
Save marshyski/8407279427ae10773f76 to your computer and use it in GitHub Desktop.
Puppet VCS example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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