Ask Your Question

require a subclass

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

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

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

lavaman gravatar image

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

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


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 -0600 )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


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

Seen: 2,897 times

Last updated: Sep 26 '13