If i understand correctly, I do not have to contain (declare contain) on the defined resource (like in app::server)? As in my example it will work as expected?
On Wednesday, September 21, 2016 at 10:59:27 AM UTC+3, R.I. Pienaar wrote: > > > > ----- Original Message ----- > > From: "Erez Zarum" <erez...@gmail.com <javascript:>> > > To: "puppet-users" <puppet...@googlegroups.com <javascript:>> > > Sent: Wednesday, 21 September, 2016 09:16:18 > > Subject: [Puppet Users] Defined Resource types and Relationship > > > Is it the same behavior as classes? > > Example: > > > > define app::server { > > ::app::server::config { '/etc/app.conf': } > > ::app::server::service { 'app': } > > > > App::Server::Config['/etc/app.conf'] -> App::Server::Service['app'] > > } > > > > define app::server::config { > > file { $name: > > ensure => present > > } > > } > > > > define app::server::service { > > service { $name: > > ensure => 'running' > > } > > } > > > > Will this work as expected, what happens if i have dependency resources > > inside the defined types? will it contain it as well? > > yes with the same caveats as classes and class containment > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e9f7d63d-73fa-44e0-b7c2-900c3b6c48c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.