Re: [Puppet Users] Defined Resource types and Relationship

2016-09-21 Thread Erez Zarum
Thanks!

On Wednesday, September 21, 2016 at 11:26:57 AM UTC+3, R.I. Pienaar wrote:
>
>
>
> - Original Message - 
> > From: "Erez Zarum" <erez...@gmail.com > 
> > To: "puppet-users" <puppet...@googlegroups.com > 
> > Sent: Wednesday, 21 September, 2016 10:19:24 
> > Subject: Re: [Puppet Users] Defined Resource types and Relationship 
>
> > 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? 
>
> yes, your example is fine, i mean containment if you were to include 
> anything 
> in the define 
>

-- 
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/7089e3e7-1cbc-401e-9f8c-6b9ef75f8907%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Defined Resource types and Relationship

2016-09-21 Thread R.I.Pienaar


- Original Message -
> From: "Erez Zarum" <erezza...@gmail.com>
> To: "puppet-users" <puppet-users@googlegroups.com>
> Sent: Wednesday, 21 September, 2016 10:19:24
> Subject: Re: [Puppet Users] Defined Resource types and Relationship

> 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?

yes, your example is fine, i mean containment if you were to include anything
in the define

-- 
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/1043987034.9938.1474446410004.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Defined Resource types and Relationship

2016-09-21 Thread Erez Zarum
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 > 
> > To: "puppet-users" <puppet...@googlegroups.com > 
> > 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.


Re: [Puppet Users] Defined Resource types and Relationship

2016-09-21 Thread R.I.Pienaar


- Original Message -
> From: "Erez Zarum" <erezza...@gmail.com>
> To: "puppet-users" <puppet-users@googlegroups.com>
> 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/214964943.339.147748140.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Defined Resource types and Relationship

2016-09-21 Thread Erez Zarum
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?





-- 
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/e06eb5f0-3613-4d23-a898-3342eb086e31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.