From: Peter Palfrader Date: Thu, 27 Aug 2009 14:44:46 +0000 (+0200) Subject: Set alternatives for editor X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2f0cdbb3c69400e04c769e9efaa34fa8940267a2;p=dsa-puppet.git Set alternatives for editor --- diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index fb5540e6..19fbd606 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -9,6 +9,13 @@ define sysctl($key, $value, $ensure=present) { } } +define set_alternatives($linkto) { + exec { "/usr/sbin/update-alternatives --set $name $linkto": + unless => "/bin/sh -c '! [ -e $linkto ] || ! [ -e /etc/alternatives/$name ] || ([ -L /etc/alternatives/$name ] && [ /etc/alternatives/$name -ef $linkto ])'" + } +} + + class debian-org { package { "userdir-ldap": ensure => installed; "zsh": ensure => installed; @@ -105,6 +112,10 @@ class debian-org { value => 4096, } + set_alternatives { "editor": + linkto => "/usr/bin/vim.basic", + } + exec { "syslog-ng reload": path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true,