diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-06-02 17:34:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-06-02 17:34:28 -0300 |
commit | 083c46bcae2054233d16ad94fb46c5958c6666d4 (patch) | |
tree | 305b5cecf0e4720c9fc008f52b7dd20be80795a8 | |
parent | ea61a6019db1ad3fd592489a97a746e0f67622fe (diff) | |
download | puppet-git-083c46bcae2054233d16ad94fb46c5958c6666d4.tar.gz puppet-git-083c46bcae2054233d16ad94fb46c5958c6666d4.tar.bz2 |
Use 'git' instead of 'gitolite' user
-rw-r--r-- | manifests/gitolite.pp | 38 | ||||
-rw-r--r-- | manifests/gitosis.pp | 20 |
2 files changed, 29 insertions, 29 deletions
diff --git a/manifests/gitolite.pp b/manifests/gitolite.pp index ecf3fa1..b04926b 100644 --- a/manifests/gitolite.pp +++ b/manifests/gitolite.pp @@ -6,15 +6,15 @@ class git::gitolite inherits git { file { "/var/git": ensure => directory, mode => 0755, - owner => gitolite, - group => gitolite, + owner => git, + group => git, } # repositories folder file { "/var/git/repositories": ensure => directory, - owner => gitolite, - group => gitolite, + owner => git, + group => git, mode => 0755, recurse => false, } @@ -34,7 +34,7 @@ class git::gitolite inherits git { package { "gitosis": ensure => purged } # ensures that the group exists - group { "gitolite": + group { "git": ensure => present, allowdupe => false, require => Package["gitolite"], @@ -43,16 +43,16 @@ class git::gitolite inherits git { # alters the user's home dir # set '*' on password field to avoid this issue: # https://stackoverflow.com/questions/15664561/ssh-key-asks-for-password/15761971#15761971 - user { "gitolite": + user { "git": allowdupe => false, comment => "git repository hosting,,,", ensure => present, home => "/var/git", shell => "/bin/sh", - gid => "gitolite", + gid => "git", password => '*', groups => [ "puppet" ], - require => Group["gitolite"], + require => Group["git"], } # tries to get rid of ugly directory structure @@ -60,32 +60,32 @@ class git::gitolite inherits git { ensure => absent, force => true, backup => false, - require => User["gitolite"], + require => User["git"], } - # we also don't need /var/gitolite + # we also don't need /var/lib/gitolite file { "/var/lib/gitolite": ensure => absent, force => true, backup => false, - require => User["gitolite"], + require => User["git"], } file { "/var/git/.gitolite.rc": ensure => present, - owner => gitolite, - group => gitolite, + owner => git, + group => git, mode => 0644, source => "puppet:///modules/git/gitolite.rc.${::lsbdistcodename}", - require => [ File['/var/git'], User['gitolite'] ], + require => [ File['/var/git'], User['git'] ], } file { "/var/git/projects.list": ensure => present, - owner => gitolite, - group => gitolite, + owner => git, + group => git, mode => 0644, - require => [ File['/var/git'], User['gitolite'] ], + require => [ File['/var/git'], User['git'] ], } @@ -120,8 +120,8 @@ class git::gitolite inherits git { 'squeeze' => absent, default => directory, }, - owner => gitolite, - group => gitolite, + owner => git, + group => git, mode => 0755, require => File['/var/git'], } diff --git a/manifests/gitosis.pp b/manifests/gitosis.pp index a903c80..2463ea0 100644 --- a/manifests/gitosis.pp +++ b/manifests/gitosis.pp @@ -6,15 +6,15 @@ class git::gitosis inherits git { file { "/var/git": ensure => directory, mode => 0755, - owner => gitosis, - group => gitosis, + owner => git, + group => git, } # repositories folder file { "/var/git/repositories": ensure => directory, - owner => gitosis, - group => gitosis, + owner => git, + group => git, mode => 0755, recurse => false, } @@ -31,22 +31,22 @@ class git::gitosis inherits git { package { "gitosis": ensure => installed } # ensures that the group exists - group { "gitosis": + group { "git": ensure => present, allowdupe => false, require => Package["gitosis"], } # alters the user's home dir - user { "gitosis": + user { "git": allowdupe => false, comment => "git repository hosting,,,", ensure => present, home => "/var/git", shell => "/bin/sh", - gid => "gitosis", + gid => "git", groups => [ "puppet" ], - require => Group["gitosis"], + require => Group["git"], } # tries to get rid of ugly directory structure @@ -54,7 +54,7 @@ class git::gitosis inherits git { ensure => absent, force => true, backup => false, - require => User["gitosis"], + require => User["git"], } # we also don't need /var/gitosis @@ -62,7 +62,7 @@ class git::gitosis inherits git { ensure => absent, force => true, backup => false, - require => User["gitosis"], + require => User["git"], } # mass update script |