Defined Resource types and Relationship

9 просмотров
Перейти к первому непрочитанному сообщению

Erez Zarum

не прочитано,
21 сент. 2016 г., 03:16:1821.09.2016
– Puppet Users
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?



    

R.I.Pienaar

не прочитано,
21 сент. 2016 г., 03:59:2721.09.2016
– puppet-users
yes with the same caveats as classes and class containment

Erez Zarum

не прочитано,
21 сент. 2016 г., 04:19:2521.09.2016
– Puppet Users
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?

R.I.Pienaar

не прочитано,
21 сент. 2016 г., 04:26:5721.09.2016
– puppet-users


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

Erez Zarum

не прочитано,
21 сент. 2016 г., 04:32:1321.09.2016
– Puppet Users
Thanks!
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений