Skip to content

@jperras /initialize.pp
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Initialization puppet script for puppetmasterless puppet setup.
user { "git":
home => "/var/git",
ensure => present
}
file {
"/var/git":
ensure => directory,
owner => "git",
group => "git",
require => [User["git"]];
"/var/git/puppet":
ensure => directory,
owner => "git",
group => "git",
require => [User["git"], File["/var/git"]],
}
ssh_authorized_key { "git":
ensure => present,
user => "git",
key => "[PUBLIC KEY]",
name => "git@hub.unata.com",
target => "/var/git/.ssh/authorized_keys",
type => rsa,
require => [File["/var/git"], User['git']],
}
package { "git-core":
ensure => installed,
}
file { "/etc/puppet":
ensure => directory,
owner => "git",
group => "git",
require => Package['git-core']
}
exec { "Create puppet Git repo":
cwd => "/var/git/puppet",
user => "git",
group => "git",
command => "/usr/bin/git init --bare",
creates => "/var/git/puppet/HEAD",
require => [File["/var/git/puppet"], Package["git-core"], User["git"]],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.