Am Dienstag, 7. August 2012 09:47:05 UTC+2 schrieb TORO: 
>
>
> Am Montag, 6. August 2012 20:16:35 UTC+2 schrieb Ken Barber: 
>>
>> > Hope someone can help, ( not sure if this is the right place  ... as 
>> I´m new 
>> > to this group) 
>>
>> Yes - this is the correct place. 
>>
>> > I have created a new module ( see snipped from tree  below ) but its 
>> not 
>> > used and no error is reported . looks like its not recognized by the 
>> puppetd 
>>
>> Probably a silly question, but worth asking regardless: How are you 
>> including the class? Are you able to show us the file (using 
>> gist.github.com or some other form of file pasting is preferred) where 
>> this is included? I presume this is in testing/manifests/site.pp ... 
>> for example the class should be included somewhere else either using 
>> the syntax: 
>>
>> include 'itrs_probe' 
>>
>> or alternatively: 
>>
>> class { 'itrs_probe': 
>> } 
>>
>> ... or you might be using an ENC to do that which means the class 
>> needs to be included for the node in question. 
>>
>> > I have run this on a puppet - node 
>> > 
>> > puppetd --test --verbose --noop --evaltrace --environment testing 
>> > 
>> > respect. 
>> > 
>> > puppetd --test --verbose --noop --evaltrace --environment testing | 
>> grep 
>> > probe 
>> > 
>> > but it does not show any output refering to my new module 
>>
>> Adding a notify resource inside your class often helps to emit results 
>> for debugging purposes. So in your file 
>> test/modules/itrs_probe/manifests/init.pp something like: 
>>
>> class 'itrs_probe' { 
>>   notify { 'inside itrs_probe': } 
>>   ... snip ... 
>> } 
>>
>> Should emit a message when the class is included. An example of this 
>> output would be available if you ran something like this on the puppet 
>> master: 
>>
>> puppet apply -e 'include itrs_probe' --modulepath 
>> '/etc/puppet/testing/modules' 
>>
>> Potentially - we'd probably need to see the contents of your init.pp 
>> and oel.pp to elude what is happening - is it possible to show us 
>> that? 
>>
>> > on the master: 
>> > /etc/puppet 
>> > 
>> >                                           . 
>> > |-- auth.conf 
>> > |-- autosign.conf 
>> > |-- fileserver.conf 
>> > |-- local 
>> > |   `-- facts.yaml 
>> > |-- production 
>> > |   |-- manifests 
>> > |   |   |-- site.pp 
>> > ----snip------- 
>> > `-- testing 
>> >     |-- manifests 
>> >     |   `-- site.pp 
>> >     `-- modules 
>> >         |-- itrs_probe 
>> >         |   |-- README 
>> >         |   |-- files 
>> >         |   |   `-- oel 
>> >         |   |       `-- start_netprobe_inf 
>> >         |   `-- manifests 
>> >         |       |-- init.pp 
>> >         |       `-- oel.pp 
>> > The init.pp defines the class itrs_probe  and callls the subclass 
>> oel.pp 
>>
>> The fact that you say no error or message is returned tells me that 
>> either: a) the contents of the class was executed already, and is 
>> therefore exposing nothing as nothing needs to be changed (unlikely) 
>> or b) the class itself is not being included properly elsewhere. 
>>
>> Adding a notify should prove/disprove either case. Another way to see 
>> if your class was proper included is to check the classes.txt file in 
>> /var/lib/puppet/state/classes.txt on the agent. (there are other 
>> methods, but these two are simple) 
>>
>> ken. 
>>
>  
> Thanks Ken for your help
>  
> : ))   thought I had alredy replied ....
>
> Yes you are right , :
>
>> b) the class itself is not being included properly elsewhere
>
>  as it is not listed i
> /var/lib/puppet/state/classes.txt 
>
> And Yes you are right , I should have attached my init.pp and oel.pp see 
> now below:
>
> [root@ldn-lx-puppet01 manifests]# pwd
>
> /etc/puppet/testing/modules/itrs_probe/manifests
>
> [root@ldn-lx-puppet01 manifests]#
>
> [root@ldn-lx-puppet01 manifests]# more *.pp
>
> ::::::::::::::
>
> init.pp
>
> ::::::::::::::
>
> class itrs_probe () inherits local::conf {
>
> notify { 'inside itrs_probe': }
>
> case $operatingsystem {
>
> /OEL|RedHat/: { class { 'itrs_probe::oel': }
>
> }
>
> default: { }
>
> }
>
> }
>
> ::::::::::::::
>
> oel.pp
>
> ::::::::::::::
>
> class itrs_probe::oel ($region='london'){
>
> package { 'Global_NetProbe':
>
> ensure => installed,
>
> }
>
> file { '/opt/NetProbe/start_netprobe_app':
>
> owner => root,
>
> group => root,
>
> mode => 755,
>
> ensure => present,
>
> source => [ 
> "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_app",
>
> "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_app",
>
> "puppet:///modules/itrs_probe/oel/start_netprobe_app",
>
> ]
>
> }
>
> file { '/opt/NetProbe/start_netprobe_inf':
>
> owner => root,
>
> group => root,
>
> mode => 755,
>
> ensure => present,
>
> require => File['/opt/NetProbe'],
>
> source => [ 
> "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_inf",
>
> "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_inf",
>
> "puppet:///modules/itrs_probe/oel/start_netprobe_inf",
>
> ]
>
> }
>
> service { 'netprobe_app':
>
> enable => true,
>
> }
>
> service { 'netprobe_inf':
>
> enable => true,
>
> }
>
>  Package['Global_NetProbe'] -> File['/opt/NetProbe/start_netprobe_app'] 
> -> Service['netprobe_app']
>
> Package['Global_NetProbe'] -> File['/opt/NetProbe/start_netprobe_inf'] -> 
> Service['netprobe_inf']
>
> }
>
> [root@ldn-lx-puppet01 manifests]# 
>
>  Thanks & Regards
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/GPB2NzgLNXgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to