source: trunk/puppet/modules/puppet-ltsp/manifests/classes/client.pp @ 705

Last change on this file since 705 was 705, checked in by sebas@…, 14 years ago

agrego la generacion de las locales en es_AR + nuevos paquetes en el cliente

File size: 2.9 KB
RevLine 
[701]1class ltsp::client::checkoutinroot {
[580]2
[701]3    svn::checkout { ltsp-client:
[580]4       repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente",
5       local_path => "/opt/ltsp/i386",
[701]6       local_name => "root",
7       notify     => Exec["ltsp-update-image"],
8       before     => [ Exec["ltsp-update-image"]  ],
[580]9    }
10}
11
[701]12define ltsp::client::debproxy::activateclient ( $debproxyhost ) {
13   file {
14       "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy":
15        ensure  => "present",
16        content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n",
17        before  => [ Exec["ltsp-update-image"] ],
18        notify  => Exec["ltsp-update-image"],
19   }
20}
21
[705]22class ltsp::client::localgen::es_AR {
23   exec { "localgen_es_AR":
24       command => "chroot /opt/ltsp/i386/ locale-gen es_AR.UTF-8",
25       path    => "/bin:/sbin:/usr/sbin:/usr/bin",
26       unless  => "chroot /opt/ltsp/i386/ grep es_AR.UTF-8 /var/lib/locales/supported.d/local",
27       notify  => Exec["ltsp-update-image"],
28       before  => [ Exec["ltsp-update-image"] ],
29   }
30}
31
32
[701]33class ltsp::client::installpackages {
34
35    define ltsp_client_installpackages($packages) {
36       ltsp_client_installpackage { $packages: package => $name }
37    }
38 
39    define ltsp_client_installpackage($package) {
40        exec { "ltsp_client_install_$name":
41            command => "chroot ${package} apt-get -y install $name",
42            path    => "/bin:/sbin:/usr/sbin:/usr/bin",
[705]43            unless  => "chroot ${package} dpkg --get-selections $name | grep install",
[701]44            notify  => Exec["ltsp-update-image"],
45            before  => [ Exec["ltsp-update-image"] ],
46        }
47    }
48
49    ltsp_client_installpackages {
[705]50        "/opt/ltsp/i386/": packages => [ "openssh-server", "iftop", "iotop", "screen" ],
[701]51    }
52
53}
54
55
[454]56class ltsp::client::resolvsh {
57
58   # bug en ltsp de ubuntu 9.04
59   # https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957
60   file {
61     "/opt/ltsp/i386/etc/init.d/chmod-resolv.sh":
62      owner => root,
63      group => root,
64      mode => 755,
65      source => "puppet:///ltsp/etc/chmod-resolv.sh";
66   }
67}
[457]68
69class ltsp::client::ocsinventory_agent {
70
71   file {
72    "/opt/ltsp/i386/etc/ocsinventory":
73       ensure => directory,
74       owner => "root", group => "root", mode => "755";
75     "/opt/ltsp/i386/etc/ocsinventory/ocsinventory-agent.cfg":
76      owner => root,
77      group => root,
78      mode => 600,
79      source => "puppet:///ltsp/etc/ocsinventory/ocsinventory-agent.cfg";
80   }
81}
82
83# cambia el formato de como se nombran las terminales
84# en el chroot, update-initramfs -u
85# actulizar el kernel a fuera del chroot, ltsp-update-kernels
[458]86# agregar en el /var/lib/tftpboot/lts.conf
87# HOSTNAME_BASE = CTA-
88# HOSTNAME_EXTRA = mac
89
[457]90class ltsp::client::hostname::cta {
91
92   file {
93     "/opt/ltsp/i386/usr/share/initramfs-tools/scripts/nfs-bottom/ltsp":
94      owner => root,
95      group => root,
96      mode => 755,
[459]97      source => "puppet:///ltsp/ltsp";
[457]98   }
99}
100
101
Note: See TracBrowser for help on using the repository browser.