-
-
Save stevepereira/1711687 to your computer and use it in GitHub Desktop.
Initialization puppet script for puppetmasterless puppet setup.
This file contains hidden or 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
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 => "[email protected]", | |
target => "/var/git/.ssh/authorized_keys", | |
type => rsa, | |
require => [File["/var/git"], User['git']], | |
} | |
package { "git-core": | |
ensure => installed, | |
} | |
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