Package fails to install while the remainder of the manifest is processed and applied.

14 views
Skip to first unread message

Adam Breaux

unread,
Apr 22, 2014, 12:30:18 PM4/22/14
to puppet...@googlegroups.com
Here's the relevant code (init.pp):

class varnish {
  $required = $::operatingsystem ? {
    /(?i-mx:centos|fedora|redhat|scientific)/ => [ 'varnish', 'varnish-libs' ],
  }
  package { $required: ensure => 'latest' }
  file { '/etc/varnish':
    ensure => directory,
    owner  => 'root',
    group  => 'root',
    mode   => '0750',
  }
  group { 'varnish':
    ensure => present,
    gid    => 241,
  }
  user { 'varnish':
    ensure     => present,
    gid        => 241,
    home       => '/var/lib/varnish',
    shell      => '/sbin/nologin',
    managehome => true,
    uid        => 241,
  }
}

The user is created, the folder settings are applied but the package NEVER installs. It generates no errors either.

José Luis Ledesma

unread,
Apr 22, 2014, 12:42:42 PM4/22/14
to puppet...@googlegroups.com

Could be that the selector is not returning what you expect?

Btw i think that its easier to use $::osfamily

Regards,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/38fbf242-389a-4c07-a358-3c567da98411%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Breaux

unread,
Apr 22, 2014, 1:04:49 PM4/22/14
to puppet...@googlegroups.com
I use the same idiom on numerous other modules and they work without error. It's peculiar to this module.

Tried it with "osfamily" and same result, the packages are not installed.

Here's the relevant "facts"

osfamily => RedHat

operatingsystem => CentOS

José Luis Ledesma

unread,
Apr 22, 2014, 3:48:23 PM4/22/14
to puppet...@googlegroups.com

I would try setting a notify to check if $required really got the value, or setting the array directly in the package resource.

Regards,

El 22/04/2014 18:35, "Adam Breaux" <brea...@gmail.com> escribió:
--
Reply all
Reply to author
Forward
0 new messages