[icinga-checkins] icinga.org: icinga-vagrant/master: icinga2x*: Integrate vim-icinga2 package for syntax highglighting

git at icinga.org git at icinga.org
Mon Jun 20 11:09:40 CEST 2016


Module: icinga-vagrant
Branch: master
Commit: bbfd3717b7d90fde8b9f71114023d07b4cd7d3e1
URL:    https://git.icinga.org/?p=icinga-vagrant.git;a=commit;h=bbfd3717b7d90fde8b9f71114023d07b4cd7d3e1

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Mon Jun 20 11:07:58 2016 +0200

icinga2x*: Integrate vim-icinga2 package for syntax highglighting

fixes #11990

---

 icinga2x-cluster/manifests/default.pp |   21 ++++-----------------
 icinga2x/manifests/default.pp         |   23 ++++-------------------
 modules/icinga2/manifests/init.pp     |    6 ++++++
 3 files changed, 14 insertions(+), 36 deletions(-)

diff --git a/icinga2x-cluster/manifests/default.pp b/icinga2x-cluster/manifests/default.pp
index 3a4720b..c359ac7 100644
--- a/icinga2x-cluster/manifests/default.pp
+++ b/icinga2x-cluster/manifests/default.pp
@@ -64,7 +64,7 @@ if versioncmp($::puppetversion,'3.6.1') >= 0 {
   }
 }
 
-package { [ 'vim-enhanced', 'mailx', 'tree', 'gdb', 'rlwrap', 'git', 'bash-completion' ]:
+package { [ 'mailx', 'tree', 'gdb', 'rlwrap', 'git', 'bash-completion' ]:
   ensure => 'installed',
   require => Class['epel']
 }
@@ -85,22 +85,9 @@ file { '/etc/profile.d/env.sh':
   source => 'puppet:////vagrant/files/etc/profile.d/env.sh'
 }
 
-file { [ '/root/.vim',
-       '/root/.vim/syntax',
-       '/root/.vim/ftdetect' ] :
-  ensure    => 'directory'
-}
-
-exec { 'copy-vim-syntax-file':
-  path => '/bin:/usr/bin:/sbin:/usr/sbin',
-  command => 'cp -f /usr/share/doc/icinga2-common-$(rpm -q icinga2-common | cut -d\'-\' -f3)/syntax/vim/syntax/icinga2.vim /root/.vim/syntax/icinga2.vim',
-  require => [ Package['vim-enhanced'], Package['icinga2-common'], File['/root/.vim/syntax'] ]
-}
-
-exec { 'copy-vim-ftdetect-file':
-  path => '/bin:/usr/bin:/sbin:/usr/sbin',
-  command => 'cp -f /usr/share/doc/icinga2-common-$(rpm -q icinga2-common | cut -d\'-\' -f3)/syntax/vim/ftdetect/icinga2.vim /root/.vim/ftdetect/icinga2.vim',
-  require => [ Package['vim-enhanced'], Package['icinga2-common'], File['/root/.vim/syntax'] ]
+# Required by vim-icinga2
+class { 'vim':
+  opt_bg_shading => 'light',
 }
 
 ####################################
diff --git a/icinga2x/manifests/default.pp b/icinga2x/manifests/default.pp
index 2d65c80..a3481c0 100644
--- a/icinga2x/manifests/default.pp
+++ b/icinga2x/manifests/default.pp
@@ -64,7 +64,7 @@ if versioncmp($::puppetversion,'3.6.1') >= 0 {
   }
 }
 
-package { [ 'vim-enhanced', 'mailx', 'tree', 'gdb', 'rlwrap', 'git', 'bash-completion', 'screen' ]:
+package { [ 'mailx', 'tree', 'gdb', 'rlwrap', 'git', 'bash-completion', 'screen' ]:
   ensure => 'installed',
   require => Class['epel']
 }
@@ -81,24 +81,9 @@ file { '/etc/motd':
   group => root
 }
 
-file { [ '/root/.vim',
-       '/root/.vim/syntax',
-       '/root/.vim/ftdetect' ] :
-  ensure    => 'directory'
-}
-
-exec { 'copy-vim-syntax-file':
-  path => '/bin:/usr/bin:/sbin:/usr/sbin',
-  unless => 'test -f /root/.vim/syntax/icinga2.vim',
-  command => 'cp -f /usr/share/doc/icinga2-common-$(rpm -q icinga2-common | cut -d\'-\' -f3)/syntax/vim/syntax/icinga2.vim /root/.vim/syntax/icinga2.vim',
-  require => [ Package['vim-enhanced'], Package['icinga2-common'], File['/root/.vim/syntax'] ]
-}
-
-exec { 'copy-vim-ftdetect-file':
-  path => '/bin:/usr/bin:/sbin:/usr/sbin',
-  unless => 'test -f /root/.vim/ftdetect/icinga2.vim',
-  command => 'cp -f /usr/share/doc/icinga2-common-$(rpm -q icinga2-common | cut -d\'-\' -f3)/syntax/vim/ftdetect/icinga2.vim /root/.vim/ftdetect/icinga2.vim',
-  require => [ Package['vim-enhanced'], Package['icinga2-common'], File['/root/.vim/syntax'] ]
+# Required by vim-icinga2
+class { 'vim':
+  opt_bg_shading => 'light',
 }
 
 ####################################
diff --git a/modules/icinga2/manifests/init.pp b/modules/icinga2/manifests/init.pp
index 4046d2b..440ce5f 100644
--- a/modules/icinga2/manifests/init.pp
+++ b/modules/icinga2/manifests/init.pp
@@ -30,6 +30,12 @@ class icinga2 (
     alias => 'icinga2-debuginfo'
   }
 
+  package { 'vim-icinga2':
+    ensure => 'latest',
+    require => [ Class['icinga_rpm'], Class['vim'] ],
+    alias => 'vim-icinga2'
+  }
+
   service { 'icinga2':
     enable => true,
     ensure => running,



More information about the icinga-checkins mailing list