I''m having a difficult time with a dependency issue. Basically, I want to be able to call a defined type, but it''s not working out so far. I have my manifests setup like this: init.pp: class foo { .... } bar.pp: class foo::bar { include foo package{ "test": ensure => running, notify => Foo::Myservice[''test''], } } services.pp define foo::myservice($service = $title) { service { "$service": enable => true, hasstatus => true, hasrestart => true, } } So, you can see my goal is to have a single defined service function that takes a service "name" as a parameter and then I can notify it with different services names. But, I keep getting this: Error: Failed to apply catalog: Could not find dependent Foo::Myservice[''test''] Thanks! JC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwO-WVv-T_Y9JTAeW6wsUmJxWo4yV_G1X6XQ__szfq8pA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Jay Christopherson
2013-Nov-16 19:09 UTC
[Puppet Users] Re: frustrating dependency problem
There is a typo in the example class - "ensure => running" doesn''t apply to a package... sorry if that creates any confusion. On Sat, Nov 16, 2013 at 10:52 AM, Jay Christopherson <jc.listmail@gmail.com>wrote:> I''m having a difficult time with a dependency issue. Basically, I want to > be able to call a defined type, but it''s not working out so far. I have my > manifests setup like this: > > init.pp: > class foo { > .... > } > > bar.pp: > class foo::bar { > include foo > > package{ "test": > ensure => running, > notify => Foo::Myservice[''test''], > } > } > > services.pp > define foo::myservice($service = $title) { > service { "$service": > enable => true, > hasstatus => true, > hasrestart => true, > } > } > > So, you can see my goal is to have a single defined service function that > takes a service "name" as a parameter and then I can notify it with > different services names. > > But, I keep getting this: > > Error: Failed to apply catalog: Could not find dependent > Foo::Myservice[''test''] > > Thanks! > JC > > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwZfFTg4VZLHQiDjoFqSZFTFsvmXdvOoSo1m8YTdjQfpQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Rename the file “services.pp” to "myservice.pp” to match the defined type On Nov 16, 2013, at 1:52 PM, Jay Christopherson <jc.listmail@gmail.com> wrote:> I''m having a difficult time with a dependency issue. Basically, I want to be able to call a defined type, but it''s not working out so far. I have my manifests setup like this: > > init.pp: > class foo { > .... > } > > bar.pp: > class foo::bar { > include foo > > package{ "test": > ensure => running, > notify => Foo::Myservice[''test''], > } > } > > services.pp > define foo::myservice($service = $title) { > service { "$service": > enable => true, > hasstatus => true, > hasrestart => true, > } > } > > So, you can see my goal is to have a single defined service function that takes a service "name" as a parameter and then I can notify it with different services names. > > But, I keep getting this: > > Error: Failed to apply catalog: Could not find dependent Foo::Myservice[''test''] > > Thanks! > JC > > > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwO-WVv-T_Y9JTAeW6wsUmJxWo4yV_G1X6XQ__szfq8pA%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/EB1C4A7B-5080-4568-AE96-BA9C85250CD8%40comcast.net. For more options, visit https://groups.google.com/groups/opt_out.
Jay Christopherson
2013-Nov-16 21:03 UTC
Re: [Puppet Users] frustrating dependency problem
oh damn. can''t believe I missed that. On Sat, Nov 16, 2013 at 11:59 AM, Dan White <ygor@comcast.net> wrote:> Rename the file “services.pp” to "myservice.pp” to match the defined type > > On Nov 16, 2013, at 1:52 PM, Jay Christopherson <jc.listmail@gmail.com> > wrote: > > I''m having a difficult time with a dependency issue. Basically, I want to > be able to call a defined type, but it''s not working out so far. I have my > manifests setup like this: > > init.pp: > class foo { > .... > } > > bar.pp: > class foo::bar { > include foo > > package{ "test": > ensure => running, > notify => Foo::Myservice[''test''], > } > } > > services.pp > define foo::myservice($service = $title) { > service { "$service": > enable => true, > hasstatus => true, > hasrestart => true, > } > } > > So, you can see my goal is to have a single defined service function that > takes a service "name" as a parameter and then I can notify it with > different services names. > > But, I keep getting this: > > Error: Failed to apply catalog: Could not find dependent > Foo::Myservice[''test''] > > Thanks! > JC > > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAFwM5HwO-WVv-T_Y9JTAeW6wsUmJxWo4yV_G1X6XQ__szfq8pA%40mail.gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/EB1C4A7B-5080-4568-AE96-BA9C85250CD8%40comcast.net > . > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwhM6Hfj_WUqQ-6ouhobPeuwXjtQgL0RBo0tggNTE6d%2Bw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Don’t pound on yourself Been there, done that. Glad I could help. :D On Nov 16, 2013, at 4:03 PM, Jay Christopherson <jc.listmail@gmail.com> wrote:> oh damn. can''t believe I missed that. > > > On Sat, Nov 16, 2013 at 11:59 AM, Dan White <ygor@comcast.net> wrote: > Rename the file “services.pp” to "myservice.pp” to match the defined type > > On Nov 16, 2013, at 1:52 PM, Jay Christopherson <jc.listmail@gmail.com> wrote: > >> I''m having a difficult time with a dependency issue. Basically, I want to be able to call a defined type, but it''s not working out so far. I have my manifests setup like this: >> >> init.pp: >> class foo { >> .... >> } >> >> bar.pp: >> class foo::bar { >> include foo >> >> package{ "test": >> ensure => running, >> notify => Foo::Myservice[''test''], >> } >> } >> >> services.pp >> define foo::myservice($service = $title) { >> service { "$service": >> enable => true, >> hasstatus => true, >> hasrestart => true, >> } >> } >> >> So, you can see my goal is to have a single defined service function that takes a service "name" as a parameter and then I can notify it with different services names. >> >> But, I keep getting this: >> >> Error: Failed to apply catalog: Could not find dependent Foo::Myservice[''test''] >> >> Thanks! >> JC >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwO-WVv-T_Y9JTAeW6wsUmJxWo4yV_G1X6XQ__szfq8pA%40mail.gmail.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/EB1C4A7B-5080-4568-AE96-BA9C85250CD8%40comcast.net. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFwM5HwhM6Hfj_WUqQ-6ouhobPeuwXjtQgL0RBo0tggNTE6d%2Bw%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/BCF4C926-B210-42FE-AE42-3683B41CA38A%40comcast.net. For more options, visit https://groups.google.com/groups/opt_out.