On Tue, Nov 15, 2011 at 9:53 AM, Arnau Bria <[email protected]> wrote:
> Sorry,
>
> forgot to mention that if we set 0 instead of absent, the parameter
> works:
>
> notice: 
> /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/enabled: 
> enabled changed '' to '0'

A quick glance at the type shows you need to set 1 or 0, absent means
the property should not exist rather than puppet should configure the
value to 0. present/absent is not an alias for 1/0. A quick test
confirms this:

# puppet resource yumrepo foreman
yumrepo { 'foreman':
  baseurl  => 'http://yum.theforeman.org/stable',
  descr    => 'Foreman Repo',
  enabled  => '1',
  gpgcheck => '0',
}

# puppet resource yumrepo foreman enabled=absent
notice: /Yumrepo[foreman]/enabled: undefined 'enabled' from '1'
yumrepo { 'foreman':
}

# puppet resource yumrepo foreman
yumrepo { 'foreman':
  baseurl  => 'http://yum.theforeman.org/stable',
  descr    => 'Foreman Repo',
  gpgcheck => '0',
}

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to