Ask Your Question

Unable to install vim to puppet node

asked 2016-06-06 08:24:07 -0600

rbhanot4739 gravatar image


I am very new to puppet and just started with it. I am using opensource puppet and created the following manifest on puppet master.

node '' {
  package { 'vim':
    ensure => installed,

After i run puppet agent on my node, i get the following error.

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list vim' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Main/Node[]/Package[vim]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list vim' returned 1: Error: No matching Packages to list

The strange thing is this happened with only vim, i tried installing nano by just replacing the name vim to nano in above and it worked just fine. So can anyone help me on troubleshooting and fixing the issue here. I have tried my bit could not get it resolve.

puppet --version 3.8.7

Both Puppet master and agent are running on centos 6.7.

edit retag flag offensive close merge delete


That error messaged, "No matching Packages to list", means there are no packages with names that match "vim" in the yum repositories your machine is configured to use. Which operating system and release are you running? Perhaps vim is available under a different, longer, name?

csharpsteen gravatar imagecsharpsteen ( 2016-06-06 10:13:14 -0600 )edit

Ah, CentOS 6.7. Apologies, haven't had my coffee yet this morning :)

csharpsteen gravatar imagecsharpsteen ( 2016-06-06 10:17:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-06 10:36:44 -0600

csharpsteen gravatar image

On CentOS, vim is a Virtual Package which is provided by other packages, notably vim-enhanced.

So, the following should work:

package {'vim-enhanced':
  ensure => installed

You can also enable the allow_virtual parameter which will allow Puppet to resolve vim as a package name:

package {'vim':
  ensure => installed,
  allow_virtual => true,

The allow_virtual parameter is enabled by default starting with Puppet 4, so using vim as a package name will work without any additional parameters in modern versions of Puppet.

edit flag offensive delete link more


Great thanks !! I tried allow_virtual = true and it seems to work just fine.

rbhanot4739 gravatar imagerbhanot4739 ( 2016-06-07 01:25:03 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-06-06 08:16:31 -0600

Seen: 1,006 times

Last updated: Jun 06 '16