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

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

agrego la clase para colocar el logo de cta en el plymouth boot

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}
27
28class ltsp::client::ldm::carpani_cta {
29
30    file {
31        "/opt/ltsp/i386/usr/share/ldm/themes/ldm-carpani-cta":
32         ensure  => directory,
33         mode    => 644,
34         owner   => root,
35         group   => root,
36         source  => "puppet:///ltsp/ldm-carpani-cta/",
37         recurse => "true",
38         notify  => Exec["set_ldm_theme_to_carpani_cta"],
39         before  => [ Exec["set_ldm_theme_to_carpani_cta"]  ],
40    }
41
42   exec { "set_ldm_theme_to_carpani_cta":
43       command => "chroot /opt/ltsp/i386/ update-alternatives --install /usr/share/ldm/themes/default ldm-theme /usr/share/ldm/themes/ldm-carpani-cta 100",
44       path    => "/bin:/sbin:/usr/sbin:/usr/bin",
45       unless  => "chroot /opt/ltsp/i386/ update-alternatives --query ldm-theme | grep \"Value: /usr/share/ldm/themes/ldm-carpani-cta\"",
46       notify  => Exec["ltsp-update-image"],
47       before  => [ Exec["ltsp-update-image"] ],
48   }
49
50}
51
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   file {
65       "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy":
66        ensure  => "present",
67        content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n",
68        before  => [ Exec["ltsp-update-image"] ],
69        notify  => Exec["ltsp-update-image"],
70   }
71}
72
73class ltsp::client::localgen::es_AR {
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.