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

Last change on this file since 765 was 752, checked in by alejandro@…, 14 years ago

detalles de uso del template en el README

File size: 5.1 KB
Line 
1class ltsp::client::plymouth::logocta {
2
3    file {
4        "/opt/ltsp/i386/lib/plymouth/themes/ubuntu-logo/ubuntu_logo.png":
5         mode    => 644,
6         owner   => root,
7         group   => root,
8         source  => "puppet:///login_themes/plymouth/ubuntu_logo.png",
9         notify  => Exec["ltsp_client_set_logo_en_plymouth"];
10        "/opt/ltsp/i386/lib/plymouth/themes/ubuntu-logo/ubuntu_logo16.png":
11         mode    => 644,
12         owner   => root,
13         group   => root,
14         source  => "puppet:///login_themes/plymouth/ubuntu_logo16.png",
15         notify  => Exec["ltsp_client_set_logo_en_plymouth"];
16    }
17
18    exec { "ltsp_client_set_logo_en_plymouth":
19        command     => "chroot /opt/ltsp/i386/ update-initramfs -u",
20        path        => "/bin:/sbin:/usr/sbin:/usr/bin",
21        refreshonly => true,
22        notify      => [ Exec["ltsp-update-image"], Exec["ltsp-update-kernels"] ],
23        before      => [ Exec["ltsp-update-image"], Exec["ltsp-update-kernels"] ],
24    }
25}
26
27class ltsp::client::ldm::carpani_cta {
28
29    file {
30        "/opt/ltsp/i386/usr/share/ldm/themes/ldm-carpani-cta":
31         ensure  => directory,
32         mode    => 644,
33         owner   => root,
34         group   => root,
35         source  => "puppet:///ltsp/ldm-carpani-cta/",
36         recurse => "true",
37         notify  => Exec["set_ldm_theme_to_carpani_cta"],
38         before  => [ Exec["set_ldm_theme_to_carpani_cta"]  ],
39    }
40
41   exec { "set_ldm_theme_to_carpani_cta":
42       command => "chroot /opt/ltsp/i386/ update-alternatives --install /usr/share/ldm/themes/default ldm-theme /usr/share/ldm/themes/ldm-carpani-cta 100 && chroot /opt/ltsp/i386/  update-alternatives --auto ldm-theme",
43       path    => "/bin:/sbin:/usr/sbin:/usr/bin",
44       unless  => "chroot /opt/ltsp/i386/ update-alternatives --query ldm-theme | grep \"Value: /usr/share/ldm/themes/ldm-carpani-cta\"",
45       notify  => Exec["ltsp-update-image"],
46       before  => [ Exec["ltsp-update-image"] ],
47   }
48}
49
50#### Descarga desde el trunk el archivo: resolucion-de-pantalla, tambien imagenes gpxe para crear discos booteables por red.
51#### Lo descarga a la imagen del terminal
52class ltsp::client::checkoutinroot {
53
54    svn::checkout { ltsp-client:
55       repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente",
56       local_path => "/opt/ltsp/i386",
57       local_name => "root",
58       notify     => Exec["ltsp-update-image"],
59       before     => [ Exec["ltsp-update-image"]  ],
60    }
61}
62
63define ltsp::client::debproxy::activateclient ( $debproxyhost ) {
64
65    file {
66        "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy":
67         ensure  => "present",
68         content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n",
69         before  => [ Exec["ltsp-update-image"] ],
70         notify  => Exec["ltsp-update-image"],
71    }
72}
73
74class ltsp::client::localgen::es_AR {
75
76    exec { "localgen_es_AR":
77        command => "chroot /opt/ltsp/i386/ locale-gen es_AR.UTF-8",
78        path    => "/bin:/sbin:/usr/sbin:/usr/bin",
79        unless  => "chroot /opt/ltsp/i386/ grep es_AR.UTF-8 /var/lib/locales/supported.d/local",
80        notify  => Exec["ltsp-update-image"],
81        before  => [ Exec["ltsp-update-image"] ],
82    }
83}
84
85
86class ltsp::client::installpackages {
87
88    define ltsp_client_installpackages($packages) {
89       ltsp_client_installpackage { $packages: package => $name }
90    }
91 
92    define ltsp_client_installpackage($package) {
93        exec { "ltsp_client_install_$name":
94            command => "chroot ${package} apt-get -y install $name",
95            path    => "/bin:/sbin:/usr/sbin:/usr/bin",
96            unless  => "chroot ${package} dpkg --get-selections $name | grep install",
97            notify  => Exec["ltsp-update-image"],
98            before  => [ Exec["ltsp-update-image"] ],
99        }
100    }
101
102    ltsp_client_installpackages {
103        "/opt/ltsp/i386/": packages => [ "openssh-server", "iftop", "iotop", "screen", "ocsinventory-agent" ],
104    }
105
106    include ltsp::client::ocsinventory_agent
107}
108
109
110class ltsp::client::resolvsh {
111
112   # bug en ltsp de ubuntu 9.04
113   # https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957
114   file {
115     "/opt/ltsp/i386/etc/init.d/chmod-resolv.sh":
116      owner => root,
117      group => root,
118      mode => 755,
119      source => "puppet:///ltsp/etc/chmod-resolv.sh";
120   }
121}
122
123class ltsp::client::ocsinventory_agent {
124
125   file {
126    "/opt/ltsp/i386/etc/ocsinventory":
127       ensure => directory,
128       owner => "root", group => "root", mode => "755";
129     "/opt/ltsp/i386/etc/ocsinventory/ocsinventory-agent.cfg":
130      owner => root,
131      group => root,
132      mode => 600,
133      source => "puppet:///ltsp/etc/ocsinventory/ocsinventory-agent.cfg";
134   }
135}
136
137# cambia el formato de como se nombran las terminales
138# en el chroot, update-initramfs -u
139# actulizar el kernel a fuera del chroot, ltsp-update-kernels
140# agregar en el /var/lib/tftpboot/lts.conf
141# HOSTNAME_BASE = CTA-
142# HOSTNAME_EXTRA = mac
143
144class ltsp::client::hostname::cta {
145
146   file {
147     "/opt/ltsp/i386/usr/share/initramfs-tools/scripts/nfs-bottom/ltsp":
148      owner => root,
149      group => root,
150      mode => 755,
151      source => "puppet:///ltsp/ltsp";
152   }
153}
154
155
Note: See TracBrowser for help on using the repository browser.