summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2011-03-13 11:48:23 -0300
committerdrebs <drebs@riseup.net>2011-03-13 11:48:23 -0300
commit6b8a9958ea8927a6afcdc360cc6f7d7411e5f490 (patch)
treea99538d08b67fa52fe4a0ac9a43b17073fd2d224 /manifests
downloadpuppet-hydra-6b8a9958ea8927a6afcdc360cc6f7d7411e5f490.tar.gz
puppet-hydra-6b8a9958ea8927a6afcdc360cc6f7d7411e5f490.tar.bz2
installs hydra
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp34
1 files changed, 34 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..471aa65
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,34 @@
+class hydra {
+ $hydra_dir = "/usr/local/hydra"
+
+ # the needed packages
+ package { "git-core": ensure => installed, }
+
+ exec { "clone hydra":
+ command => "if [ ! -d $hydra_dir ]; then git clone git://git.sarava.org/hydra.git $hydra_dir; fi",
+ creates => "$hydra_dir",
+ path => ["/usr/bin", "/usr/sbin"],
+ }
+
+ file { "$hydra_dir":
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ require => Exec["clone hydra"],
+ }
+
+ file { "$hydra_dir/hydra":
+ owner => "root",
+ group => "root",
+ mode => 0755,
+ require => File["$hydra_dir"],
+ }
+
+ file { ["/usr/local/sbin/hydra", "/usr/local/sbin/hydractl"]:
+ ensure => link,
+ target => "$hydra_dir/hydra",
+ require => File["$hydra_dir/hydra"],
+ }
+}
+
+include hydra