Skip to content
Browse files

using git src again

  • Loading branch information...
1 parent cc5ecfc commit fdbea1d4205923fa6255fabd8cb0f4a87b845972 @narkisr committed May 5, 2012
Showing with 17 additions and 12 deletions.
  1. +4 −0 manifests/default.pp
  2. +13 −12 modules/oh_my_zsh/manifests/init.pp
View
4 manifests/default.pp
@@ -1,4 +1,8 @@
# vagrant box seems to miss this group
group{ 'puppet': ensure => present }
+$username = 'vagrant'
+
include git
+include zsh
+include oh_my_zsh
View
25 modules/oh_my_zsh/manifests/init.pp
@@ -11,28 +11,29 @@
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
-class oh_my_zsh {
+class oh_my_zsh {
+ $home = "/home/$username"
- common::archive { ".oh-my-zsh":
- ensure => present,
- url => "https://github.com/downloads/narkisr/oh-my-zsh/.oh-my-zsh.tar.gz",
- target => "/home/$username",
- checksum => false,
- follow_redirects => true
+ exec{"clone oh-my-zsh":
+ command => "git clone git://github.com/narkisr/oh-my-zsh.git .oh-my-zsh",
+ cwd => $home,
+ user => "root",
+ path => ['/usr/bin/'],
+ unless => "test -d $home/.oh-my-zsh"
}
- file { "/home/$username/.zshrc":
+ file { "$home/.zshrc":
ensure => link,
- target => "/home/$username/.oh-my-zsh/.zshrc",
- require => Common::Archive[".oh-my-zsh"]
+ target => "$home/.oh-my-zsh/.zshrc",
+ require => Exec["clone oh-my-zsh"]
}
- file { "/home/$username/.oh-my-zsh":
+ file { "$home/.oh-my-zsh":
group => $username,
owner => $username,
mode => "0644",
- require => Common::Archive[".oh-my-zsh"]
+ require => Exec["clone oh-my-zsh"]
}
}

0 comments on commit fdbea1d

Please sign in to comment.
Something went wrong with that request. Please try again.