Merge pull request #7 from dcoxall/git-hg

Install git and mercurial
This commit is contained in:
Darren Coxall
2014-12-25 00:38:29 +00:00
3 changed files with 27 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ hello
## Choosing golang version ## Choosing golang version
This repo is hardcoded to use 1.4 although this can easily be changed after cloning. If you want to use another version simply This repo is hardcoded to use 1.4 although this can easily be changed after cloning. If you want to use another version simply
change the `$version` parameter in `manifests/init.pp`. The version string is taken from the set the `$version` parameter when calling the class. The version string is taken from the
[golang downloads list](http://golang.org/dl/). Once changed you can either call `vagrant up` if you [golang downloads list](http://golang.org/dl/). Once changed you can either call `vagrant up` if you
haven't already setup the vagrant box or `vagrant provision` if the machine is already up. haven't already setup the vagrant box or `vagrant provision` if the machine is already up.

View File

@@ -1,3 +1,15 @@
class { "golang": stage { "prepare":
version => "1.4" before => Stage["main"],
}
class setup {
exec { "update-aptitude":
command => "/usr/bin/apt-get update -y",
}
}
class {
"setup":
stage => prepare;
"golang":;
} }

View File

@@ -26,4 +26,16 @@ class golang ( $version = "1.4" ) {
unless => "/bin/grep -q GOPATH /home/vagrant/.profile ; /usr/bin/test $? -eq 0" unless => "/bin/grep -q GOPATH /home/vagrant/.profile ; /usr/bin/test $? -eq 0"
} }
if ! defined(Package["git"]) {
package { "git":
ensure => present,
}
}
if ! defined(Package["mercurial"]) {
package { "mercurial":
ensure => present,
}
}
} }