[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 |
---|
[207] | 19 | |
---|
[161] | 20 | class ltsp::common { |
---|
[159] | 21 | package { "ltsp-server": ensure => installed } |
---|
[163] | 22 | package { "ltspfs": ensure => installed } |
---|
[159] | 23 | } |
---|
| 24 | |
---|
[161] | 25 | define ltsp::buildclient ( $mirror, $securitymirror ) { |
---|
| 26 | include ltsp::common |
---|
[232] | 27 | |
---|
[161] | 28 | exec { "ltsp-build-client": |
---|
[207] | 29 | command => "ltsp-build-client --mirror=$mirror --security-mirror=$securitymirror --late-packages \"ssh munin-node\" &>/dev/null", |
---|
[163] | 30 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
[161] | 31 | creates => "/opt/ltsp/i386", |
---|
| 32 | } |
---|
| 33 | } |
---|
[163] | 34 | |
---|
[237] | 35 | class ltsp::updateclient::piloto { |
---|
[163] | 36 | |
---|
[237] | 37 | svn::checkout { ltsp-cliente: |
---|
| 38 | repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente", |
---|
| 39 | local_path => "/opt/ltsp/i386", |
---|
| 40 | local_name => "root" |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | |
---|
[163] | 44 | class ltsp::tftpdhpa::activate { |
---|
| 45 | package { "tftpd-hpa": ensure => installed } |
---|
| 46 | |
---|
| 47 | line { tftpdhpa_activate_off: |
---|
| 48 | file => "/etc/default/tftpd-hpa", |
---|
| 49 | line => 'RUN_DAEMON="no"', |
---|
| 50 | ensure => absent, |
---|
| 51 | require => Package["tftpd-hpa"] |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | line { tftpdhpa_activate_on: |
---|
| 55 | file => "/etc/default/tftpd-hpa", |
---|
| 56 | line => 'RUN_DAEMON="yes"', |
---|
| 57 | ensure => present, |
---|
| 58 | require => Package["tftpd-hpa"] |
---|
| 59 | } |
---|
| 60 | } |
---|
| 61 | |
---|