source: trunk/puppet/manifests/classes/ltsp.pp @ 426

Last change on this file since 426 was 426, checked in by sebas, 14 years ago

doc para construir el module ltsp

File size: 1.8 KB
Line 
1#
2# Example usage with a proxy of packages:
3# ltsp::buildclient { dist:
4#       mirror => "http://debproxy:3142/ar.archive.ubuntu.com/ubuntu",
5#       securitymirror => "http://debproxy:3142/security.ubuntu.com"
6# }
7#
8# to debug inside ltsp client
9# chroot /opt/ltsp/i386
10# mount /proc -t proc /proc && mount /sys -t sysfs /sys
11
12## TODO:
13# - set root password
14# - configure munin-node
15# - ocsinventory (with a preseed)
16# - update client con pilotos de red + scripts
17# - sourcelist for the security
18# - cleanup packages after an update because it grows the image
19# - http://bazaar.launchpad.net/~jigish-gohil/kiwi-ltsp/trunk/annotate/head%3A/trunk/kiwi-ltsp/ltsp/include/kiwi-ltsp-functions.sh#
20
21class ltsp::common {
22  package { "ltsp-server": ensure => installed }
23  package { "ltspfs": ensure => installed }
24}
25
26define ltsp::buildclient ( $mirror, $securitymirror  ) {
27    include ltsp::common
28
29    exec { "ltsp-build-client":
30        command => "ltsp-build-client --mirror=$mirror --security-mirror=$securitymirror --late-packages \"ssh munin-node\" &>/dev/null",
31        path => "/bin:/sbin:/usr/sbin:/usr/bin",
32        creates => "/opt/ltsp/i386",
33    }
34}
35
36class ltsp::updateclient::piloto {
37
38    svn::checkout { ltsp-cliente:
39       repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente",
40       local_path => "/opt/ltsp/i386",
41       local_name => "root"
42    }
43}
44
45class ltsp::tftpdhpa::activate {
46        package { "tftpd-hpa": ensure => installed }
47
48        line { tftpdhpa_activate_off:
49        file => "/etc/default/tftpd-hpa",
50        line => 'RUN_DAEMON="no"',
51        ensure => absent,
52        require => Package["tftpd-hpa"]
53        }
54
55        line { tftpdhpa_activate_on:
56        file => "/etc/default/tftpd-hpa",
57        line => 'RUN_DAEMON="yes"',
58        ensure => present,
59        require => Package["tftpd-hpa"]
60        }
61}
62
Note: See TracBrowser for help on using the repository browser.