Skip to content
Snippets Groups Projects
init.pp 1.69 KiB
Newer Older
schiermi's avatar
schiermi committed
class system {

schiermi's avatar
schiermi committed
	exec { 'add-architecture-i386':
schiermi's avatar
schiermi committed
		command => '/usr/bin/dpkg --add-architecture i386',
		unless => '/bin/fgrep -q i386 /var/lib/dpkg/arch',
schiermi's avatar
schiermi committed
		notify => Exec['aptget-update'],
	}

	exec { 'aptget-update':
		command => '/usr/bin/apt-get update',
		refreshonly => true,
	}

schiermi's avatar
schiermi committed
	$packages = [
		'sudo',
		'lsof',
		'vim',
		'screen',
		'rsync',
		'tcpdump',
		'pv',
		'openssh-server',
schiermi's avatar
schiermi committed
		'locales-all',
schiermi's avatar
schiermi committed
		'libpam-tmpdir',
		'broadcom-sta-dkms',
schiermi's avatar
schiermi committed
	]
  
	package { $packages:
		ensure => installed,
schiermi's avatar
schiermi committed
	}

schiermi's avatar
schiermi committed
	package { 'libpam-mount':
		ensure => installed,
	}

	file { '/etc/security/pam_mount.conf.xml':
schiermi's avatar
schiermi committed
		ensure => file,
schiermi's avatar
schiermi committed
		source => 'puppet:///modules/system/etc/security/pam_mount.conf.xml',
schiermi's avatar
schiermi committed
		mode => 'a=r',
		require => Package['libpam-mount'],
	}
schiermi's avatar
schiermi committed

	package { 'chrony':
		ensure => installed,
	}

	service { 'chrony':
		ensure => running,
		enable => true,
		hasstatus  => false,
		hasrestart => true,
		require => Package['chrony'],
	}
schiermi's avatar
schiermi committed

schiermi's avatar
schiermi committed
	package { 'network-manager':
schiermi's avatar
schiermi committed
		ensure => installed,
	}

schiermi's avatar
schiermi committed
	file { '/etc/network/interfaces':
		ensure => file,
		source => 'puppet:///modules/system/etc/network/interfaces',
		mode => 'a=r',
		require => Package['network-manager'],
	}

schiermi's avatar
schiermi committed
	file { '/etc/NetworkManager/system-connections/ffm.freifunk.net':
schiermi's avatar
schiermi committed
		ensure => file,
schiermi's avatar
schiermi committed
		source => 'puppet:///modules/system/etc/NetworkManager/system-connections/ffm.freifunk.net',
schiermi's avatar
schiermi committed
		mode => 'a=,u=r',
schiermi's avatar
schiermi committed
		require => Package['network-manager'],
schiermi's avatar
schiermi committed
	}

	file { '/etc/NetworkManager/system-connections/wired':
schiermi's avatar
schiermi committed
		ensure => file,
schiermi's avatar
schiermi committed
		source => 'puppet:///modules/system/etc/NetworkManager/system-connections/wired',
schiermi's avatar
schiermi committed
		mode => 'a=,u=r',
schiermi's avatar
schiermi committed
		require => Package['network-manager'],
schiermi's avatar
schiermi committed
	}

	package { 'wicd*':
		ensure => absent,
schiermi's avatar
schiermi committed
		require => Package['network-manager'],
schiermi's avatar
schiermi committed
	}

schiermi's avatar
schiermi committed
}