[714] | 1 | class ltsp::client::plymouth::logocta { |
---|
| 2 | |
---|
| 3 | file { |
---|
| 4 | "/opt/ltsp/i386/lib/plymouth/themes/ubuntu-logo/ubuntu_logo.png": |
---|
| 5 | mode => 644, |
---|
| 6 | owner => root, |
---|
| 7 | group => root, |
---|
| 8 | source => "puppet:///login_themes/plymouth/ubuntu_logo.png", |
---|
| 9 | notify => Exec["ltsp_client_set_logo_en_plymouth"]; |
---|
| 10 | "/opt/ltsp/i386/lib/plymouth/themes/ubuntu-logo/ubuntu_logo16.png": |
---|
| 11 | mode => 644, |
---|
| 12 | owner => root, |
---|
| 13 | group => root, |
---|
| 14 | source => "puppet:///login_themes/plymouth/ubuntu_logo16.png", |
---|
| 15 | notify => Exec["ltsp_client_set_logo_en_plymouth"]; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | exec { "ltsp_client_set_logo_en_plymouth": |
---|
[715] | 19 | command => "chroot /opt/ltsp/i386/ update-initramfs -u", |
---|
| 20 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
| 21 | refreshonly => true, |
---|
| 22 | notify => [ Exec["ltsp-update-image"], Exec["ltsp-update-kernels"] ], |
---|
| 23 | before => [ Exec["ltsp-update-image"], Exec["ltsp-update-kernels"] ], |
---|
[714] | 24 | } |
---|
| 25 | } |
---|
| 26 | |
---|
[707] | 27 | class ltsp::client::ldm::carpani_cta { |
---|
| 28 | |
---|
| 29 | file { |
---|
| 30 | "/opt/ltsp/i386/usr/share/ldm/themes/ldm-carpani-cta": |
---|
| 31 | ensure => directory, |
---|
| 32 | mode => 644, |
---|
| 33 | owner => root, |
---|
| 34 | group => root, |
---|
| 35 | source => "puppet:///ltsp/ldm-carpani-cta/", |
---|
| 36 | recurse => "true", |
---|
[714] | 37 | notify => Exec["set_ldm_theme_to_carpani_cta"], |
---|
| 38 | before => [ Exec["set_ldm_theme_to_carpani_cta"] ], |
---|
[707] | 39 | } |
---|
| 40 | |
---|
| 41 | exec { "set_ldm_theme_to_carpani_cta": |
---|
[716] | 42 | command => "chroot /opt/ltsp/i386/ update-alternatives --install /usr/share/ldm/themes/default ldm-theme /usr/share/ldm/themes/ldm-carpani-cta 100 && chroot /opt/ltsp/i386/ update-alternatives --auto ldm-theme", |
---|
[707] | 43 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
| 44 | unless => "chroot /opt/ltsp/i386/ update-alternatives --query ldm-theme | grep \"Value: /usr/share/ldm/themes/ldm-carpani-cta\"", |
---|
| 45 | notify => Exec["ltsp-update-image"], |
---|
| 46 | before => [ Exec["ltsp-update-image"] ], |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | |
---|
[752] | 50 | #### Descarga desde el trunk el archivo: resolucion-de-pantalla, tambien imagenes gpxe para crear discos booteables por red. |
---|
| 51 | #### Lo descarga a la imagen del terminal |
---|
[701] | 52 | class ltsp::client::checkoutinroot { |
---|
[580] | 53 | |
---|
[701] | 54 | svn::checkout { ltsp-client: |
---|
[580] | 55 | repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/ltsp-cliente", |
---|
| 56 | local_path => "/opt/ltsp/i386", |
---|
[701] | 57 | local_name => "root", |
---|
| 58 | notify => Exec["ltsp-update-image"], |
---|
| 59 | before => [ Exec["ltsp-update-image"] ], |
---|
[580] | 60 | } |
---|
| 61 | } |
---|
| 62 | |
---|
[701] | 63 | define ltsp::client::debproxy::activateclient ( $debproxyhost ) { |
---|
[715] | 64 | |
---|
| 65 | file { |
---|
| 66 | "/opt/ltsp/i386/etc/apt/apt.conf.d/01proxy": |
---|
| 67 | ensure => "present", |
---|
| 68 | content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n", |
---|
| 69 | before => [ Exec["ltsp-update-image"] ], |
---|
| 70 | notify => Exec["ltsp-update-image"], |
---|
| 71 | } |
---|
[701] | 72 | } |
---|
| 73 | |
---|
[705] | 74 | class ltsp::client::localgen::es_AR { |
---|
[715] | 75 | |
---|
| 76 | exec { "localgen_es_AR": |
---|
| 77 | command => "chroot /opt/ltsp/i386/ locale-gen es_AR.UTF-8", |
---|
| 78 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
| 79 | unless => "chroot /opt/ltsp/i386/ grep es_AR.UTF-8 /var/lib/locales/supported.d/local", |
---|
| 80 | notify => Exec["ltsp-update-image"], |
---|
| 81 | before => [ Exec["ltsp-update-image"] ], |
---|
| 82 | } |
---|
[705] | 83 | } |
---|
| 84 | |
---|
| 85 | |
---|
[701] | 86 | class ltsp::client::installpackages { |
---|
| 87 | |
---|
| 88 | define ltsp_client_installpackages($packages) { |
---|
| 89 | ltsp_client_installpackage { $packages: package => $name } |
---|
| 90 | } |
---|
| 91 | |
---|
| 92 | define ltsp_client_installpackage($package) { |
---|
| 93 | exec { "ltsp_client_install_$name": |
---|
| 94 | command => "chroot ${package} apt-get -y install $name", |
---|
| 95 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
[705] | 96 | unless => "chroot ${package} dpkg --get-selections $name | grep install", |
---|
[701] | 97 | notify => Exec["ltsp-update-image"], |
---|
| 98 | before => [ Exec["ltsp-update-image"] ], |
---|
| 99 | } |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | ltsp_client_installpackages { |
---|
[749] | 103 | "/opt/ltsp/i386/": packages => [ "openssh-server", "iftop", "iotop", "screen", "ocsinventory-agent" ], |
---|
[701] | 104 | } |
---|
| 105 | |
---|
[749] | 106 | include ltsp::client::ocsinventory_agent |
---|
[701] | 107 | } |
---|
| 108 | |
---|
| 109 | |
---|
[454] | 110 | class ltsp::client::resolvsh { |
---|
| 111 | |
---|
| 112 | # bug en ltsp de ubuntu 9.04 |
---|
| 113 | # https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957 |
---|
| 114 | file { |
---|
| 115 | "/opt/ltsp/i386/etc/init.d/chmod-resolv.sh": |
---|
| 116 | owner => root, |
---|
| 117 | group => root, |
---|
| 118 | mode => 755, |
---|
| 119 | source => "puppet:///ltsp/etc/chmod-resolv.sh"; |
---|
| 120 | } |
---|
| 121 | } |
---|
[457] | 122 | |
---|
| 123 | class ltsp::client::ocsinventory_agent { |
---|
| 124 | |
---|
| 125 | file { |
---|
| 126 | "/opt/ltsp/i386/etc/ocsinventory": |
---|
| 127 | ensure => directory, |
---|
| 128 | owner => "root", group => "root", mode => "755"; |
---|
| 129 | "/opt/ltsp/i386/etc/ocsinventory/ocsinventory-agent.cfg": |
---|
| 130 | owner => root, |
---|
| 131 | group => root, |
---|
| 132 | mode => 600, |
---|
| 133 | source => "puppet:///ltsp/etc/ocsinventory/ocsinventory-agent.cfg"; |
---|
| 134 | } |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | # cambia el formato de como se nombran las terminales |
---|
| 138 | # en el chroot, update-initramfs -u |
---|
| 139 | # actulizar el kernel a fuera del chroot, ltsp-update-kernels |
---|
[458] | 140 | # agregar en el /var/lib/tftpboot/lts.conf |
---|
| 141 | # HOSTNAME_BASE = CTA- |
---|
| 142 | # HOSTNAME_EXTRA = mac |
---|
| 143 | |
---|
[457] | 144 | class ltsp::client::hostname::cta { |
---|
| 145 | |
---|
| 146 | file { |
---|
| 147 | "/opt/ltsp/i386/usr/share/initramfs-tools/scripts/nfs-bottom/ltsp": |
---|
| 148 | owner => root, |
---|
| 149 | group => root, |
---|
| 150 | mode => 755, |
---|
[459] | 151 | source => "puppet:///ltsp/ltsp"; |
---|
[457] | 152 | } |
---|
| 153 | } |
---|
| 154 | |
---|
| 155 | |
---|