[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) |
---|
[207] | 16 | |
---|
[161] | 17 | class ltsp::common { |
---|
[159] | 18 | package { "ltsp-server": ensure => installed } |
---|
[163] | 19 | package { "ltspfs": ensure => installed } |
---|
[159] | 20 | } |
---|
| 21 | |
---|
[161] | 22 | define ltsp::buildclient ( $mirror, $securitymirror ) { |
---|
| 23 | include ltsp::common |
---|
[232] | 24 | |
---|
[161] | 25 | exec { "ltsp-build-client": |
---|
[207] | 26 | command => "ltsp-build-client --mirror=$mirror --security-mirror=$securitymirror --late-packages \"ssh munin-node\" &>/dev/null", |
---|
[163] | 27 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
[161] | 28 | creates => "/opt/ltsp/i386", |
---|
| 29 | } |
---|
| 30 | } |
---|
[163] | 31 | |
---|
| 32 | |
---|
| 33 | class ltsp::tftpdhpa::activate { |
---|
| 34 | package { "tftpd-hpa": ensure => installed } |
---|
| 35 | |
---|
| 36 | line { tftpdhpa_activate_off: |
---|
| 37 | file => "/etc/default/tftpd-hpa", |
---|
| 38 | line => 'RUN_DAEMON="no"', |
---|
| 39 | ensure => absent, |
---|
| 40 | require => Package["tftpd-hpa"] |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | line { tftpdhpa_activate_on: |
---|
| 44 | file => "/etc/default/tftpd-hpa", |
---|
| 45 | line => 'RUN_DAEMON="yes"', |
---|
| 46 | ensure => present, |
---|
| 47 | require => Package["tftpd-hpa"] |
---|
| 48 | } |
---|
| 49 | } |
---|
| 50 | |
---|