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

Last change on this file since 719 was 716, checked in by sebas@…, 15 years ago

Pongo alternatives ldm-theme en modo auto

File size: 4.8 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
50class ltsp::client::checkoutinroot {
51
52    svn::checkout { ltsp-client:
53       repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente",
54       local_path => "/opt/ltsp/i386",
55       local_name => "root",
56       notify     => Exec["ltsp-update-image"],
57       before     => [ Exec["ltsp-update-image"]  ],
58    }
59}
60
61define ltsp::client::debproxy::activateclient ( $debproxyhost ) {
62
63    file {
64        "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy":
65         ensure  => "present",
66         content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n",
67         before  => [ Exec["ltsp-update-image"] ],
68         notify  => Exec["ltsp-update-image"],
69    }
70}
71
72class ltsp::client::localgen::es_AR {
73
74    exec { "localgen_es_AR":
75        command => "chroot /opt/ltsp/i386/ locale-gen es_AR.UTF-8",
76        path    => "/bin:/sbin:/usr/sbin:/usr/bin",
77        unless  => "chroot /opt/ltsp/i386/ grep es_AR.UTF-8 /var/lib/locales/supported.d/local",
78        notify  => Exec["ltsp-update-image"],
79        before  => [ Exec["ltsp-update-image"] ],
80    }
81}
82
83
84class ltsp::client::installpackages {
85
86    define ltsp_client_installpackages($packages) {
87       ltsp_client_installpackage { $packages: package => $name }
88    }
89 
90    define ltsp_client_installpackage($package) {
91        exec { "ltsp_client_install_$name":
92            command => "chroot ${package} apt-get -y install $name",
93            path    => "/bin:/sbin:/usr/sbin:/usr/bin",
94            unless  => "chroot ${package} dpkg --get-selections $name | grep install",
95            notify  => Exec["ltsp-update-image"],
96            before  => [ Exec["ltsp-update-image"] ],
97        }
98    }
99
100    ltsp_client_installpackages {
101        "/opt/ltsp/i386/": packages => [ "openssh-server", "iftop", "iotop", "screen" ],
102    }
103
104}
105
106
107class ltsp::client::resolvsh {
108
109   # bug en ltsp de ubuntu 9.04
110   # https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957
111   file {
112     "/opt/ltsp/i386/etc/init.d/chmod-resolv.sh":
113      owner => root,
114      group => root,
115      mode => 755,
116      source => "puppet:///ltsp/etc/chmod-resolv.sh";
117   }
118}
119
120class ltsp::client::ocsinventory_agent {
121
122   file {
123    "/opt/ltsp/i386/etc/ocsinventory":
124       ensure => directory,
125       owner => "root", group => "root", mode => "755";
126     "/opt/ltsp/i386/etc/ocsinventory/ocsinventory-agent.cfg":
127      owner => root,
128      group => root,
129      mode => 600,
130      source => "puppet:///ltsp/etc/ocsinventory/ocsinventory-agent.cfg";
131   }
132}
133
134# cambia el formato de como se nombran las terminales
135# en el chroot, update-initramfs -u
136# actulizar el kernel a fuera del chroot, ltsp-update-kernels
137# agregar en el /var/lib/tftpboot/lts.conf
138# HOSTNAME_BASE = CTA-
139# HOSTNAME_EXTRA = mac
140
141class ltsp::client::hostname::cta {
142
143   file {
144     "/opt/ltsp/i386/usr/share/initramfs-tools/scripts/nfs-bottom/ltsp":
145      owner => root,
146      group => root,
147      mode => 755,
148      source => "puppet:///ltsp/ltsp";
149   }
150}
151
152
Note: See TracBrowser for help on using the repository browser.