Puppet Class: vim

Defined in:
manifests/init.pp

Summary

This module manages Vim

Overview

Examples:

include vim

Parameters:

  • package_provider (Optional[String[1]]) (defaults to: undef)

    The puppet provider to be used for the package resources.

  • package_list (Array[String[1]]) (defaults to: ['vim-common', 'vim-enhanced'])

    List of vim packages to be present.

  • root_vimrc_source (String[1]) (defaults to: 'vim/vimrc')

    Value of the source parameter used in the file resource for managing .vimrc.

  • root_vimrc_path (Stdlib::Absolutepath) (defaults to: '/root/.vimrc')

    Path to the .vimrc configuration file.

  • root_vimrc_owner (String[1]) (defaults to: 'root')

    Owner of the .vimrc file.

  • root_vimrc_group (String[1]) (defaults to: 'root')

    Group of the .vimrc file.

  • root_vimrc_mode (Stdlib::Filemode) (defaults to: '0644')

    Mode of the .vimrc file.

  • root_vim_dir_source (String[1]) (defaults to: 'vim/vim')

    Value of the source parameter used in the file resource for managing the .vim directory.

  • root_vim_dir_path (Stdlib::Absolutepath) (defaults to: '/root/.vim')

    Path to the .vim directory.

  • root_vim_dir_owner (String[1]) (defaults to: 'root')

    Owner of the .vim directory.

  • root_vim_dir_group (String[1]) (defaults to: 'root')

    Group of the .vim directory.

  • root_vim_dir_mode (Stdlib::Filemode) (defaults to: '0644')

    Mode of the .vim directory.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'manifests/init.pp', line 44

class vim (
  Optional[String[1]] $package_provider = undef,
  Array[String[1]] $package_list = ['vim-common', 'vim-enhanced'],

  String[1] $root_vimrc_source = 'vim/vimrc',
  Stdlib::Absolutepath $root_vimrc_path = '/root/.vimrc',
  String[1] $root_vimrc_owner = 'root',
  String[1] $root_vimrc_group = 'root',
  Stdlib::Filemode $root_vimrc_mode = '0644',

  String[1] $root_vim_dir_source = 'vim/vim',
  Stdlib::Absolutepath $root_vim_dir_path = '/root/.vim',
  String[1] $root_vim_dir_owner = 'root',
  String[1] $root_vim_dir_group = 'root',
  Stdlib::Filemode $root_vim_dir_mode = '0644',
) {

  package { $package_list:
    ensure   => present,
    provider => $package_provider,
  }

  file { 'root_vimrc':
    ensure => file,
    source => "puppet:///modules/${root_vimrc_source}",
    path   => $root_vimrc_path,
    owner  => $root_vimrc_owner,
    group  => $root_vimrc_group,
    mode   => $root_vimrc_mode,
  }

  file { 'root_vim_dir':
    ensure  => directory,
    recurse => true,
    source  => "puppet:///modules/${root_vim_dir_source}",
    path    => $root_vim_dir_path,
    owner   => $root_vim_dir_owner,
    group   => $root_vim_dir_group,
    mode    => $root_vim_dir_mode,
  }
}