site.pp Does include work inside a node definition?

34 views
Skip to first unread message

Puppet Muppet

unread,
Nov 16, 2013, 1:13:04 PM11/16/13
to puppet...@googlegroups.com

Hi, 

Is it possible to use Include as I have done below, inside my node statement?
I'm guessing not as it's not working :) 

Any ideas how I get my test.pp manifest so that it only applys to my puppetagent001?


#site.pp
node 'puppetagent001' {
include test
file {'/tmp/puppet-test-node-def':
  ensure  => present,
  content => "Hello World!",
    }
}


#test.pp
class test
file {'/tmp/puppet-test':
  ensure  => present,
  content => "Hello World!",
    }
}


Many thanks,
PM

Puppet Muppet

unread,
Nov 17, 2013, 10:58:16 AM11/17/13
to puppet...@googlegroups.com
OK got it working!

jcbollinger

unread,
Nov 18, 2013, 10:10:18 AM11/18/13
to puppet...@googlegroups.com


On Saturday, November 16, 2013 12:13:04 PM UTC-6, Puppet Muppet wrote:

Hi, 

Is it possible to use Include as I have done below, inside my node statement?


For the record, yes, the 'include' statement can be used inside node definitions.


John

Reply all
Reply to author
Forward
0 new messages