Ask Your Question
1

require a subclass

asked 2013-09-26 11:16:43 -0500

spuder gravatar image

How do you impose a requirement on a subclass?

#This example does not work
include apt

apt::ppa { 'ppa:git-core/ppa': }

package { 'git-core': 
  ensure => latest, 
  require => Apt::ppa['ppa:git-core/ppa'],
  # What is the syntax for require apt::pap   ?
}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-09-26 12:40:50 -0500

lavaman gravatar image

updated 2013-09-26 12:47:03 -0500

It looks like you are using a defined type called apt::ppa, so you would need to capitalize all the words of the type:

require => Apt::Ppa['ppa:git-core/ppa'],

If you were declaring a class called apt::ppa, you would want to require the class:

require => Class['apt::ppa'],

edit flag offensive delete link more

Comments

That's it. I had to make both Apt and Ppa uppercase. Also thanks for clarifying, this is a type, not a class

spuder gravatar imagespuder ( 2013-09-26 18:29:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-09-26 11:16:43 -0500

Seen: 2,550 times

Last updated: Sep 26 '13