Ugo,

That is one way to do it. However, to use the roles and profiles pattern
fully, you would `include role::base` there, which would include your base
profile classes. Additionally, you would move the sudo statements into a
profile class so that the include role is the ONLY line in the default node
 block.

With that in mind, Matt's hiera include pattern is more dynamic and means
you only need one node definition - the default - and a robust hiera/ENC
setup. You would want to transition to something like that eventually.

On Tuesday, October 18, 2016, Ugo Bellavance <u...@lubik.ca> wrote:

> So if my default node looks like this:
>
> node default {
>     class { 'sudo': }
>
>     sudo::conf { 'wheel':
>       content  => '%wheel  ALL=(ALL)       ALL',
>   }
>
>     sudo::conf { 'defaults_mail_always':
>       content  => 'Defaults    mail_always',
>   }
> }
>
> Do I simply insert include profile::base in there to add what's in this
> profile?
>
> Thanks,
>
> Ugo
>
> On Tuesday, October 18, 2016 at 2:09:34 PM UTC-4, Matt wrote:
>>
>> Yeah, agreed, my default node looks like:
>> node default {
>>   $role=hiera('role')
>>   include $role
>> }
>>
>> and the  lowest priority/default-est part of my hiera hierarchy has role:
>> role::base. other actually classified things get role set at various parts
>> of the hierarchy as needed.
>>
>>
>> On Tue, Oct 18, 2016 at 2:04 PM Peter Kristolaitis <alt...@alter3d.ca>
>> wrote:
>>
>>> There is no magic involved in roles and profiles -- they're just classes
>>> that get assigned to nodes based on the node's definition.
>>>
>>> Thus, if you want a default role assigned to the default node
>>> definition... then assign that default role to the default node definition.
>>>
>>>
>>>
>>>
>>> On 2016-10-18 01:58 PM, Ugo Bellavance wrote:
>>>
>>> Hi,
>>>
>>> Is there an equivalent of the default node definition when using
>>> profiles and roles?
>>>
>>> Thanks,
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/puppet-users/7a443246-ab0f-4872-943f-66780adff83c%40googlegroups.com
>>> <https://groups.google.com/d/msgid/puppet-users/7a443246-ab0f-4872-943f-66780adff83c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/puppet-users/e3afe4b3-0cdf-3478-cb07-a580923f3ba9%40alter3d.ca
>>> <https://groups.google.com/d/msgid/puppet-users/e3afe4b3-0cdf-3478-cb07-a580923f3ba9%40alter3d.ca?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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
> <javascript:_e(%7B%7D,'cvml','puppet-users%2bunsubscr...@googlegroups.com');>
> .
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/d57c4923-ec7c-40a4-93db-e401bdf68e4b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/d57c4923-ec7c-40a4-93db-e401bdf68e4b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Rob Nelson
rnels...@gmail.com

-- 
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/CAC76iT_ukdsO_j5hbZPEHNe30Zy1wcNrOBs59oJ2uR%3DQE%2BPPcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to