我创建了下一个Puppet清单文件:
node 'puppetmaster' { package { "screen": ensure => "installed"} $enhancers = [ "pixman","pixman-devel","libXfont","tigervnc-server" ] package { $enhancers: ensure => "installed" } file { '/etc/skel/.vimrc': content => ":set nu\n :set incsearch\n :set ignorecase\n :set smartcase\n:set ts=2",} file { '/root/.vimrc': content => ":set nu\nset incsearch\n:set ignorecase\n:set smartcase\n:set ts=2",} file { '/etc/sysconfig/vncserver': content => 'VNCSERVERS="6:root"\nVNCSERVERARGS[6]="-geometry 1152x864"',} }
应用清单后,我检查/ etc / sysconfig / vncserver,它看起来像这样:
VNCSERVERS=6:root\nVNCSERVERARGS[6]="-geometry 1152x864"
而不是像这样分成两行:
VNCSERVERS=6:root VNCSERVERARGS[6]="-geometry 1152x864"
我在设置/etc/skel/.vimrc文件时使用相同的格式,它就像一个魅力,所以我不明白为什么它在设置/ etc / sysconfig / vncserver时不起作用,我相信它有一些东西用双引号做“”.
任何帮助,将不胜感激!