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

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

agrego la clase para tener el thema ldm carpani-cta

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