On Tuesday, April 7, 2015 at 3:05:09 AM UTC+10, staceyt...@gmail.com wrote:
>
> Hi all,
>
> I am trying to use puppet to downgrade my gdm package from 64 to 39, but 
> got package dependency problem:
>
> Here is my class:
>
> class gdmver39 {
>   yumrepo { 'custom':
>     baseurl => 'file:/home/admin/REPO/WS6.4',
>     enabled => 1,
>   }
>
>   package { "gdm-libs": ensure => '2.30.4-39.el6', require => 
> Yumrepo["custom"] }   
>   package { "gdm-plugin-fingerprint": ensure => '2.30.4-39.el6', require 
> => Yumrepo["custom"] }
>   package { "gdm": ensure => '2.30.4-39.el6', require => Yumrepo["custom"] 
> } 
> }
>
> I think myabe i should add the parameter below to my 'gdm' line'?
>
>       require Package['gdm-libs', 'gdm-plugin-fingerprint'] 
>
> How to tell puppet to handle the dependency automatically?
>
 
You probably want something like:

class gdmver39 {
  yumrepo { 'custom':
    baseurl => 'file:/home/admin/REPO/WS6.4',
    enabled => 1,
  }

  # set defaults for package type within this class
  Package {
    ensure => '2.30.4-39.el6',
    require => Yumrepo['custom'],
  }

  package { 'gdm-libs': }   
  package { 'gdm-plugin-fingerprint': }
  package { 'gdm': require => [Package['gdm-libs'], 
Package['gdb-plugin-fingerprint'] }
}

That said, I probably wouldn't use Puppet to do this.  I would have puppet 
just ensure that the packages are present and then do the downgrade outside 
of Puppet.
  

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f498e363-204e-4371-bcbf-f033bb4ab82c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to