Correct indentation and alignment
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
class { "golang":
|
class { "golang":
|
||||||
version => "1.3.1"
|
version => "1.3.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
class golang ( $version = "1.3.1" ) {
|
class golang ( $version = "1.3.1" ) {
|
||||||
|
|
||||||
exec { "download-golang":
|
exec { "download-golang":
|
||||||
command => "/usr/bin/wget --no-check-certificate -O /usr/local/src/go$version.linux-amd64.tar.gz http://golang.org/dl/go$version.linux-amd64.tar.gz",
|
command => "/usr/bin/wget --no-check-certificate -O /usr/local/src/go$version.linux-amd64.tar.gz http://golang.org/dl/go$version.linux-amd64.tar.gz",
|
||||||
creates => "/usr/local/src/go$version.linux-amd64.tar.gz"
|
creates => "/usr/local/src/go$version.linux-amd64.tar.gz"
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "remove-previous-version":
|
exec { "remove-previous-version":
|
||||||
command => "/bin/rm -r /usr/local/go",
|
command => "/bin/rm -r /usr/local/go",
|
||||||
onlyif => "/usr/bin/test -d /usr/local/go",
|
onlyif => "/usr/bin/test -d /usr/local/go",
|
||||||
before => Exec["unarchive-golang-tools"]
|
before => Exec["unarchive-golang-tools"]
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "unarchive-golang-tools":
|
exec { "unarchive-golang-tools":
|
||||||
command => "/bin/tar -C /usr/local -xzf /usr/local/src/go$version.linux-amd64.tar.gz",
|
command => "/bin/tar -C /usr/local -xzf /usr/local/src/go$version.linux-amd64.tar.gz",
|
||||||
require => Exec["download-golang"]
|
require => Exec["download-golang"]
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "setup-path":
|
exec { "setup-path":
|
||||||
command => "/bin/echo 'export PATH=/vagrant/bin:/usr/local/go/bin:\$PATH' >> /home/vagrant/.profile",
|
command => "/bin/echo 'export PATH=/vagrant/bin:/usr/local/go/bin:\$PATH' >> /home/vagrant/.profile",
|
||||||
unless => "/bin/grep -q /usr/local/go /home/vagrant/.profile ; /usr/bin/test $? -eq 0"
|
unless => "/bin/grep -q /usr/local/go /home/vagrant/.profile ; /usr/bin/test $? -eq 0"
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "setup-workspace":
|
exec { "setup-workspace":
|
||||||
command => "/bin/echo 'export GOPATH=/vagrant' >> /home/vagrant/.profile",
|
command => "/bin/echo 'export GOPATH=/vagrant' >> /home/vagrant/.profile",
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user