Index: tareas_puppet/servidores_aula/instala-sun-java6/leeme.txt
===================================================================
--- tareas_puppet/servidores_aula/instala-sun-java6/leeme.txt	(nonexistent)
+++ tareas_puppet/servidores_aula/instala-sun-java6/leeme.txt	(revision 111)
@@ -0,0 +1,18 @@
+BREVE DESCRIPCION DE LA EJECUCION DEL MODULO
+--------------------------------------------
+
+Tarea que nos permite instalar el sun-java6 en los servidores de aula e imagen de clientes.
+
+También rehace los enlaces de /etc/alternatives
+
+INSTRUCCIONES DE INSTALACION DEL MODULO
+---------------------------------------
+
+Desempaquetar en /etc/puppet/modules
+Incluir la linea include "nombre_modulo" en /etc/puppet/manifests/classes/clase-especifica.pp
+
+------------------------------------------------
+
+11-Marzo-2011.
+Francisco Rodrigo L�pez
+Administrador inform�tico del IES Javier Garc�a T�llez

Property changes on: tareas_puppet/servidores_aula/instala-sun-java6/leeme.txt
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: tareas_puppet/servidores_aula/instala-sun-java6/manifests/init.pp
===================================================================
--- tareas_puppet/servidores_aula/instala-sun-java6/manifests/init.pp	(nonexistent)
+++ tareas_puppet/servidores_aula/instala-sun-java6/manifests/init.pp	(revision 111)
@@ -0,0 +1,52 @@
+# /etc/puppet/modules/instala-sun-java6/manifests/init.pp
+
+class instala-sun-java6 {
+   
+        file { "/var/log/preseed.sun":
+        owner => root, group => root, mode => 644,
+        source => "puppet:///instala-sun-java6/preseed.sun",
+	notify => Exec["sun-java6"],
+        }
+
+        exec { "sun-java6":
+	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+        command => "debconf-set-selections < /var/log/preseed.sun ; apt-get update ; apt-get install -y sun-java6-bin sun-java6-jre sun-java6-plugin sun-java6-fonts",
+        require => File["/var/log/preseed.sun"],
+        unless => "ls /var/lib/dpkg/info/sun-java6-jre.list",
+	notify => Exec["nuevos_enlaces-java"]
+	}
+
+        exec { "nuevos_enlaces-java":
+	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+        command => "update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java; update-alternatives --set java_vm /usr/lib/jvm/java-6-sun/jre/bin/java_vm; update-alternatives --set javaws /usr/lib/jvm/java-6-sun/jre/bin/javaws; ",
+	refreshonly => true,
+	}
+
+        file { "/opt/ltsp/i386/var/log/preseed.sun":
+        owner => root, group => root, mode => 644,
+        source => "puppet:///instala-sun-java6/preseed.sun",
+	notify => Exec["sun-java6-thinclient"];
+        }
+
+        exec { "sun-java6-thinclient":
+	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+        command => "chroot /opt/ltsp/i386 debconf-set-selections < /var/log/preseed.sun ; chroot /opt/ltsp/i386 apt-get update ; chroot /opt/ltsp/i386 apt-get install -y sun-java6-bin sun-java6-jre sun-java6-plugin sun-java6-fonts",
+        require => File["/opt/ltsp/i386/var/log/preseed.sun"],
+        unless => "ls /opt/ltsp/i386/var/lib/dpkg/info/sun-java6-jre.list",
+	notify => Exec["nuevos_enlaces-java-thinclient"];
+	}
+
+        exec { "nuevos_enlaces-java-thinclient":
+	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+        command => "chroot /opt/ltsp/i386 update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java; chroot /opt/ltsp/i386 update-alternatives --set java_vm /usr/lib/jvm/java-6-sun/jre/bin/java_vm; chroot /opt/ltsp/i386 update-alternatives --set javaws /usr/lib/jvm/java-6-sun/jre/bin/javaws; ",
+	refreshonly => true,
+	notify => Exec[crear-imagen-sun-java6];
+	}
+
+	exec { "crear-imagen-sun-java6":
+	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+        command => "ltsp-update-image --arch i386",
+        refreshonly => true;
+       }
+
+}
Index: tareas_puppet/servidores_aula/instala-sun-java6/files/preseed.sun
===================================================================
--- tareas_puppet/servidores_aula/instala-sun-java6/files/preseed.sun	(nonexistent)
+++ tareas_puppet/servidores_aula/instala-sun-java6/files/preseed.sun	(revision 111)
@@ -0,0 +1,6 @@
+sun-java6-bin	shared/accepted-sun-dlj-v1-1	boolean	true
+sun-java6-jre	shared/accepted-sun-dlj-v1-1	boolean	true
+sun-java6-jre	sun-java6-jre/stopthread	boolean	true
+sun-java6-jre	sun-java6-jre/jcepolicy	note	
+sun-java6-bin	shared/present-sun-dlj-v1-1	note	
+sun-java6-jre	shared/present-sun-dlj-v1-1	note	
