[701] | 1 | class ltsp::client::checkoutinroot { |
---|
[580] | 2 | |
---|
[701] | 3 | svn::checkout { ltsp-client: |
---|
[580] | 4 | repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente", |
---|
| 5 | local_path => "/opt/ltsp/i386", |
---|
[701] | 6 | local_name => "root", |
---|
| 7 | notify => Exec["ltsp-update-image"], |
---|
| 8 | before => [ Exec["ltsp-update-image"] ], |
---|
[580] | 9 | } |
---|
| 10 | } |
---|
| 11 | |
---|
[701] | 12 | define ltsp::client::debproxy::activateclient ( $debproxyhost ) { |
---|
| 13 | file { |
---|
| 14 | "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy": |
---|
| 15 | ensure => "present", |
---|
| 16 | content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n", |
---|
| 17 | before => [ Exec["ltsp-update-image"] ], |
---|
| 18 | notify => Exec["ltsp-update-image"], |
---|
| 19 | } |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | class ltsp::client::installpackages { |
---|
| 23 | |
---|
| 24 | define ltsp_client_installpackages($packages) { |
---|
| 25 | ltsp_client_installpackage { $packages: package => $name } |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | define ltsp_client_installpackage($package) { |
---|
| 29 | exec { "ltsp_client_install_$name": |
---|
| 30 | command => "chroot ${package} apt-get -y install $name", |
---|
| 31 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
| 32 | unless => "chroot ${package} dpkg -l $name", |
---|
| 33 | notify => Exec["ltsp-update-image"], |
---|
| 34 | before => [ Exec["ltsp-update-image"] ], |
---|
| 35 | } |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | ltsp_client_installpackages { |
---|
| 39 | "/opt/ltsp/i386/": packages => [ "ssh", "iftop", "iotop" ], |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | |
---|
[454] | 45 | class ltsp::client::resolvsh { |
---|
| 46 | |
---|
| 47 | # bug en ltsp de ubuntu 9.04 |
---|
| 48 | # https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957 |
---|
| 49 | file { |
---|
| 50 | "/opt/ltsp/i386/etc/init.d/chmod-resolv.sh": |
---|
| 51 | owner => root, |
---|
| 52 | group => root, |
---|
| 53 | mode => 755, |
---|
| 54 | source => "puppet:///ltsp/etc/chmod-resolv.sh"; |
---|
| 55 | } |
---|
| 56 | } |
---|
[457] | 57 | |
---|
| 58 | class ltsp::client::ocsinventory_agent { |
---|
| 59 | |
---|
| 60 | file { |
---|
| 61 | "/opt/ltsp/i386/etc/ocsinventory": |
---|
| 62 | ensure => directory, |
---|
| 63 | owner => "root", group => "root", mode => "755"; |
---|
| 64 | "/opt/ltsp/i386/etc/ocsinventory/ocsinventory-agent.cfg": |
---|
| 65 | owner => root, |
---|
| 66 | group => root, |
---|
| 67 | mode => 600, |
---|
| 68 | source => "puppet:///ltsp/etc/ocsinventory/ocsinventory-agent.cfg"; |
---|
| 69 | } |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | # cambia el formato de como se nombran las terminales |
---|
| 73 | # en el chroot, update-initramfs -u |
---|
| 74 | # actulizar el kernel a fuera del chroot, ltsp-update-kernels |
---|
[458] | 75 | # agregar en el /var/lib/tftpboot/lts.conf |
---|
| 76 | # HOSTNAME_BASE = CTA- |
---|
| 77 | # HOSTNAME_EXTRA = mac |
---|
| 78 | |
---|
[457] | 79 | class ltsp::client::hostname::cta { |
---|
| 80 | |
---|
| 81 | file { |
---|
| 82 | "/opt/ltsp/i386/usr/share/initramfs-tools/scripts/nfs-bottom/ltsp": |
---|
| 83 | owner => root, |
---|
| 84 | group => root, |
---|
| 85 | mode => 755, |
---|
[459] | 86 | source => "puppet:///ltsp/ltsp"; |
---|
[457] | 87 | } |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | |
---|