Experiments part 5
authorAndreas Schiermeier <andreas@schiermeier.name>
Wed, 9 Dec 2015 23:14:15 +0000 (00:14 +0100)
committerAndreas Schiermeier <andreas@schiermeier.name>
Wed, 9 Dec 2015 23:14:15 +0000 (00:14 +0100)
modules/desktop/manifests/init.pp
modules/system/manifests/init.pp

index b230b46..9185452 100644 (file)
@@ -30,8 +30,11 @@ class desktop {
        user { 'guest':
                ensure => 'present',
                home => '/home/guest',
+               # password: guest
+               password => '$6$pheeghohphaikuka$lJodCaTfZG4IhXw9.htxDsMDAiQrhOsXyJR.nvCdWc2EHgmstkTrpn/8LWi83e9Ac.WFDfzmQ1phpDII/npl/0',
                managehome => true,
                gid => 'guest',
+               shell => '/bin/bash',
                require => Group['guest'],
        }
 
@@ -43,5 +46,52 @@ class desktop {
                                ],
        }
 
+       $packages_i386 = [
+               'libc6:i386',
+               'libqt4-dbus:i386',
+               'libqt4-network:i386',
+               'libqt4-xml:i386',
+               'libqtcore4:i386',
+               'libqtgui4:i386',
+               'libqtwebkit4:i386',
+               'libstdc++6:i386',
+               'libx11-6:i386',
+               'libxext6:i386',
+               'libxss1:i386',
+               'libxv1:i386',
+               'libssl1.0.0:i386',
+               'libpulse0:i386',
+               'libasound2-plugins:i386',
+       ]
+
+       package { $packages_i386:
+               ensure => installed
+               subscribe => Exec['add-architecture-i386'],
+       }
+
+       exec { 'download-skype':
+               command => '/usr/bin/wget -qO/var/cache/.skype-install.deb.part http://www.skype.com/go/getskype-linux-deb && /bin/mv /tmp/.skype-install.deb.part /var/cache/skype-install.deb',
+               creates => '/var/cache/skype-install.deb',
+               notify => Package['skype'],
+       }
+
+       package { 'skype':
+               provider => dpkg,
+               ensure => latest,
+               source => '/var/cache/skype-install.deb',
+       }
+
+       file { '/etc/skel/Desktop':
+               ensure => directory,
+       }
+
+       file { '/etc/skel/Desktop/skype.desktop':
+               source => '/usr/share/applications/skype.desktop',
+               require => [
+                       Package['skype'],
+                       File['/etc/skel/Desktop'],
+               ],
+       }
+
 
 }
index eb55f36..606b5a5 100644 (file)
@@ -1,5 +1,16 @@
 class system {
 
+       exec { 'add-architecture-i386':
+               command => '/usr/bin/dpkg --add-architecture i386'
+               unless => '/bin/fgrep -q i386 /var/lib/dpkg/arch'
+               notify => Exec['aptget-update'],
+       }
+
+       exec { 'aptget-update':
+               command => '/usr/bin/apt-get update',
+               refreshonly => true,
+       }
+
        $packages = [
                'sudo',
                'lsof',