X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian_org%2Fmanifests%2Finit.pp;h=6bb70c52d5f9aeb936182b7d7fee8d73321dc1c4;hb=b78ee63ff3937f8b2ebc6c2d1eef36402e9f22ff;hp=27a3c87fd2adfcc37f05c521e8dbf9bfe0d06e11;hpb=7b395dc95743fc1484cc0fe2cc9c264c156ebcc1;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian_org/manifests/init.pp b/modules/debian_org/manifests/init.pp index 27a3c87fd..6bb70c52d 100644 --- a/modules/debian_org/manifests/init.pp +++ b/modules/debian_org/manifests/init.pp @@ -6,7 +6,7 @@ class debian_org { include debian_org::apt if $systemd { - include systemd + include dsa_systemd $servicefiles = 'present' } else { $servicefiles = 'absent' @@ -41,25 +41,14 @@ class debian_org { ensure => installed, tag => extra_repo, } - file { '/etc/ssh/ssh_known_hosts': - ensure => present, - replace => false, - mode => '0644', - source => 'puppet:///modules/debian_org/basic-ssh_known_hosts' - } - if versioncmp($::lsbmajdistrelease, '8') >= 0 { - $rubyfs_package = 'ruby-filesystem' - } else { - $rubyfs_package = 'libfilesystem-ruby1.9' - } package { [ 'apt-utils', 'bash-completion', 'dnsutils', 'less', 'lsb-release', - $rubyfs_package, + 'ruby-filesystem', 'mtr-tiny', 'nload', 'pciutils', @@ -132,9 +121,16 @@ class debian_org { content => template('debian_org/debian_facts.yaml.erb') } file { '/etc/timezone': - source => 'puppet:///modules/debian_org/timezone', + content => "Etc/UTC\n", notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'], } + if versioncmp($::lsbmajdistrelease, '9') >= 0 { # jessie has a regular file there, for instance + file { '/etc/localtime': + ensure => 'link', + target => '/usr/share/zoneinfo/Etc/UTC', + notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'], + } + } if $::hostname == handel { include puppetmaster::db $dbpassword = $puppetmaster::db::password @@ -349,4 +345,29 @@ class debian_org { key => 'kernel.unprivileged_bpf_disabled', value => '1', } + + # Disable kpartx udev rules + file { '/etc/udev/rules.d/60-kpartx.rules': + ensure => $has_lib_udev_rules_d_60_kpartx_rules ? { true => 'present', default => 'absent' }, + content => "", + mode => '0444', + } + + # this is only to avoid warnings, else puppet will complain that we + # have a symlink there, even if we're not replacing it anyhow. + if ! $has_etc_ssh_ssh_known_hosts { + file { '/etc/ssh/ssh_known_hosts': + ensure => 'present', + replace => 'no', + content => inline_template('<%= open("/etc/ssh/ssh_known_hosts").read() %>'), + notify => Exec['ud-replicate'], + } + } + + exec { 'ud-replicate': + path => '/usr/bin:/usr/sbin:/bin:/sbin', + command => '/usr/bin/ud-replicate', + refreshonly => true, + require => Package['userdir-ldap'] + } }