Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This doesn't work. I expected to install Package['util-master'], etc.
- # but instead I get the error:
- # 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
- # Note that 'jobs::install' is the title of the class, not the title of the
- # package resource being declared.
- node default {
- include jobs
- }
- class jobs {
- include jobs::params, jobs::install
- Class["jobs::params"] -> Class["jobs::install"]
- }
- class jobs::params {
- $package_version='latest'
- $package_branch='master'
- $package_list=[ "mail", "content", "keyword", "classifierpy", "util", ]
- }
- class jobs::install {
- # Install the whole list
- package { $jobs::params::package_list:
- name => "${title}-${jobs::params::package_branch}",
- ensure => $jobs::params::package_version
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement