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

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

doc para construir el module ltsp

File size: 1.8 KB
RevLine 
[159]1#
[163]2# Example usage with a proxy of packages:
[161]3# ltsp::buildclient { dist:
[163]4#       mirror => "http://debproxy:3142/ar.archive.ubuntu.com/ubuntu",
5#       securitymirror => "http://debproxy:3142/security.ubuntu.com"
[161]6# }
[207]7#
8# to debug inside ltsp client
9# chroot /opt/ltsp/i386
10# mount /proc -t proc /proc && mount /sys -t sysfs /sys
[159]11
[207]12## TODO:
13# - set root password
14# - configure munin-node
[232]15# - ocsinventory (with a preseed)
[237]16# - update client con pilotos de red + scripts
[251]17# - sourcelist for the security
18# - cleanup packages after an update because it grows the image
[426]19# - http://bazaar.launchpad.net/~jigish-gohil/kiwi-ltsp/trunk/annotate/head%3A/trunk/kiwi-ltsp/ltsp/include/kiwi-ltsp-functions.sh#
[207]20
[161]21class ltsp::common {
[159]22  package { "ltsp-server": ensure => installed }
[163]23  package { "ltspfs": ensure => installed }
[159]24}
25
[161]26define ltsp::buildclient ( $mirror, $securitymirror  ) {
27    include ltsp::common
[232]28
[161]29    exec { "ltsp-build-client":
[207]30        command => "ltsp-build-client --mirror=$mirror --security-mirror=$securitymirror --late-packages \"ssh munin-node\" &>/dev/null",
[163]31        path => "/bin:/sbin:/usr/sbin:/usr/bin",
[161]32        creates => "/opt/ltsp/i386",
33    }
34}
[163]35
[237]36class ltsp::updateclient::piloto {
[163]37
[237]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
[163]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.