Commit ba23aba981fabf2ca53cb5de7ab6519ae71e3446
1 parent
a692ae54
Exists in
master
and in
39 other branches
Installing vim package if it's not installed
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
puppet/modules/vim/manifests/init.pp
1 | class vim ( | 1 | class vim ( |
2 | $vim_file = 'puppet:///modules/vim/vimrc.local' | 2 | $vim_file = 'puppet:///modules/vim/vimrc.local' |
3 | ) { | 3 | ) { |
4 | - | 4 | + |
5 | + if ! defined(Package['vim']) { | ||
6 | + package { 'vim': | ||
7 | + ensure => installed | ||
8 | + } | ||
9 | + } | ||
10 | + | ||
5 | file { 'editor_vim': | 11 | file { 'editor_vim': |
6 | path => '/etc/profile.d/editor.sh', | 12 | path => '/etc/profile.d/editor.sh', |
7 | ensure => present, | 13 | ensure => present, |
@@ -14,4 +20,4 @@ class vim ( | @@ -14,4 +20,4 @@ class vim ( | ||
14 | source => $vim_file | 20 | source => $vim_file |
15 | } | 21 | } |
16 | 22 | ||
17 | -} | ||
18 | \ No newline at end of file | 23 | \ No newline at end of file |
24 | +} |