Advertisement
pbpolar

Bug in package title

Feb 13th, 2012
2,996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 1.10 KB | None | 0 0
  1. # This doesn't work.  I expected to install Package['util-master'], etc.
  2. # but instead I get the error:
  3. # Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Package[content] to ["jobs::install-master"] at /Users/pburkholder/.tmp/site_clean.pp:34; resource ["Package", "jobs::install-master"] already defined at /Users/pburkholder/.tmp/site_clean.pp:34 at /Users/pburkholder/.tmp/site_clean.pp:34 on node peters-macbook-pro.local
  4. # Note that 'jobs::install' is the title of the class, not the title of the
  5. # package resource being declared.
  6.  
  7.  
  8. node default {
  9.   include jobs
  10. }
  11.  
  12. class jobs {
  13.         include jobs::params, jobs::install
  14.  
  15.         Class["jobs::params"] -> Class["jobs::install"]
  16. }
  17.  
  18. class jobs::params {
  19.     $package_version='latest'
  20.     $package_branch='master'
  21.     $package_list=[ "mail", "content", "keyword", "classifierpy", "util", ]
  22. }
  23.  
  24. class jobs::install {
  25.     # Install the whole list
  26.     package { $jobs::params::package_list:
  27.         name    => "${title}-${jobs::params::package_branch}",
  28.         ensure => $jobs::params::package_version
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement