Puppet not recognising packages (which exist in yum) in Centos

timhc22 asked:

I am trying to install a package in Centos using puppet.

The package can be installed using yum install (sudo yum install bash-completion), but puppet says it doen’t exist! (I have had this problem when trying to install several other packages too).

Here is what I am using:

    file { '/etc/bash_completion.d/symfony2-autocomplete.bash':
        ensure => present,
        owner => 'vagrant',
        group => 'vagrant',
        mode => '0777',
        require => Package['bash-completion'],
        content => template('extras/symfony2-autocomplete.bash'),

Is there a list of puppet packages available? (or maybe have I forgotten to include something somewhere?)


My answer:

On CentOS 6, bash-completion is in the EPEL repository. You either forgot to add EPEL, or your manifest is trying to install bash-completion before adding the EPEL repo.

It’s in the base repositories in CentOS 7.

Oh, and your file ownership and permissions are wrong, but you probably knew that already…

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.