On Tue, Nov 30, 2010 at 8:30 AM, dragonfly <j.paul.land...@gmail.com> wrote:
> Hi, I am a new Puppet user and I have the following question.  On
> Debian I created the following recipe:
>
> class ntpdate {
>
>        package { ["ntpdate"]:
>                ensure => installed
> }
>
> }
>
>
> However, I had forgotten that my sources.list contained a reference to
> the cdrom, so it failed.  Rather than remove the cdrom line from
> sources.list I instead tried each of the following 2 changes to my
> package recipe, neither of which was successful:
>
> allowcdrom => false
> allowcdrom => true
>
> My assumption was that "allowcdrom => false" meant "puppet will now
> instruct apt to ignore the cdrom line in sources.list and instead just
> move on to using the debian repositories", but apparently this is not
> the case.  So, my question is what exactly does "allowcdrom" do in a
> package recipe?

Simply whether cdrom is allowed as a deb source, it does not disable
it from the repository, and I do not see an option in apt-get that can
be passed to disable cdrom:

 36     if @@checkedforcdrom and @resource[:allowcdrom] != :true
 37       raise Puppet::Error,
 38         "/etc/apt/sources.list contains a cdrom source; not
installing.  Use 'allowcdrom' to override this failure."
 39     end

I would manage the sources.list as a file resource if you need to disable cdrom.

Thanks,

Nan

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

Reply via email to