@@ -29,7 +29,7 @@ hello
|
||||
|
||||
## 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
|
||||
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
|
||||
haven't already setup the vagrant box or `vagrant provision` if the machine is already up.
|
||||
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
class { "golang":
|
||||
version => "1.4"
|
||||
stage { "prepare":
|
||||
before => Stage["main"],
|
||||
}
|
||||
|
||||
class setup {
|
||||
exec { "update-aptitude":
|
||||
command => "/usr/bin/apt-get update -y",
|
||||
}
|
||||
}
|
||||
|
||||
class {
|
||||
"setup":
|
||||
stage => prepare;
|
||||
"golang":;
|
||||
}
|
||||
|
||||
@@ -26,4 +26,16 @@ class golang ( $version = "1.4" ) {
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user