From 6b8a9958ea8927a6afcdc360cc6f7d7411e5f490 Mon Sep 17 00:00:00 2001 From: drebs Date: Sun, 13 Mar 2011 11:48:23 -0300 Subject: installs hydra --- manifests/init.pp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 manifests/init.pp (limited to 'manifests') 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 -- cgit v1.2.3