<div dir="ltr">Lonnie,<div><br></div><div>I'm running 3.2, so this may not be exactly the same. If I understand what you want to do, you want to run, say ntp on only some systems:</div><div><br></div><div>Create a module -- ntp_basic or some such</div>
<div>Create a group -- ntp_systems</div><div>Edit the group and add nodes to the ntp_systems</div><div>Edit the group and add ntp_basic to the classes</div><div>Try a run_once of this group</div><div><br></div><div>David A. Bandel</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 11:48 AM, Lonni J Friedman <span dir="ltr"><<a href="mailto:netllama@gmail.com" target="_blank">netllama@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Sep 6, 2013 at 12:41 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
> Sorry. I forgot a ":". It should be class { "ntp": }<br>
<br>
</div>That didn't help much. Now its back to complaining about duplicate<br>
declarations:<br>
Duplicate declaration: Class[Ntp] is already declared in file<br>
/etc/puppet/manifests/services/ntp.pp at line 4; cannot redeclare at<br>
/etc/puppet/manifests/site.pp:5<br>
<div class="im"><br>
><br>
> If you're just starting, you might want to do their online<br>
> introduction. It was quite good the last time I checked it.<br>
><br>
> You download a VM and you start following the online tutorial (it uses<br>
> puppet enterprise instead of the open source version, but it makes no<br>
> difference for learning). See <a href="http://docs.puppetlabs.com/learning/" target="_blank">http://docs.puppetlabs.com/learning/</a><br>
<br>
</div>Yea, i've read through much of it already, but its not helping much<br>
with this particular problem.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> On 5 September 2013 19:36, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>> I thought that anything included in the default node definition is<br>
>> auto-inherited by the other nodes? Anyway, I tried adding the default<br>
>> node definition that you wrote, but that doesn't pass validation:<br>
>> Error 400 on SERVER: Could not parse for environment production:<br>
>> Syntax error at '}'; expected '}' at /etc/puppet/manifests/site.pp:3<br>
>><br>
>><br>
>> I was planning to look into hiera at some point, but I wanted to get<br>
>> something more basic in place first, then improve upon it later. Baby<br>
>> steps, etc.<br>
>><br>
>> On Thu, Sep 5, 2013 at 11:17 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
>>> You don't have to include them there.<br>
>>><br>
>>> Puppet auto loads the modules. Let's say you have your ntp module in<br>
>>> whatever your modules dir is named (usually would be<br>
>>> /etc/puppet/modules/ntp/*).<br>
>>><br>
>>> In your default node definition, you do something like this:<br>
>>><br>
>>> node default {<br>
>>> class { 'ntp' }<br>
>>> }<br>
>>><br>
>>> The includes in site.pp are useful for when you have a lot of node<br>
>>> definitions. Using inclide, you can split them into multiple files so<br>
>>> it's easier to maintain (e.g., include webservers/*)<br>
>>><br>
>>> If you want better control over individual node configuration, then<br>
>>> look into using parameterized classes and hiera. At my previous job, I<br>
>>> used them to be able to override defaults in multiple layers:<br>
>>> host<br>
>>> role<br>
>>> domain<br>
>>> global<br>
>>><br>
>>><br>
>>> On 5 September 2013 18:00, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>>>> *sigh* you're right. This is annoying behavior. This implies that<br>
>>>> installing any modules means that they are going to apply to every<br>
>>>> node.<br>
>>>><br>
>>>> I googled for how to exclude a module from a node, and most of the<br>
>>>> suggestions were rather hacky:<br>
>>>> <a href="https://groups.google.com/forum/#!topic/puppet-users/a1muJHCs-hQ" target="_blank">https://groups.google.com/forum/#!topic/puppet-users/a1muJHCs-hQ</a><br>
>>>><br>
>>>> I tried to follow that one, by creating a new class which explicitly<br>
>>>> disables ntp, but then I was seeing duplicate service (ntp)<br>
>>>> declaration errors. feh.<br>
>>>><br>
>>>> On Thu, Sep 5, 2013 at 9:09 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
>>>>> This seems to say that it does get applied to all nodes:<br>
>>>>> <a href="http://docs.puppetlabs.com/puppet/2.7/reference/lang_import.html" target="_blank">http://docs.puppetlabs.com/puppet/2.7/reference/lang_import.html</a><br>
>>>>><br>
>>>>> On 5 September 2013 16:36, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>>>>>> in services/* I've got:<br>
>>>>>> download_files.pp hello.pp ntp.pp pkg.pp tester.pp<br>
>>>>>><br>
>>>>>> The only place that ntp is referenced is ntp.pp which i'm not even<br>
>>>>>> including any longer in site.pp. So unless the import implicitly<br>
>>>>>> includes everything (and it doesn't seem like, since none of the<br>
>>>>>> others are enabled globally by default), I don't think that's the<br>
>>>>>> issue.<br>
>>>>>><br>
>>>>>> On Thu, Sep 5, 2013 at 8:30 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
>>>>>>> What are you adding in "import "services/*""? It looks like you're<br>
>>>>>>> installing, at least, snmp and apache. So heres the silly question:<br>
>>>>>>> are you sure that you're not including ntp somewhere in there too?<br>
>>>>>>><br>
>>>>>>> Fed.<br>
>>>>>>><br>
>>>>>>> On 5 September 2013 16:15, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>>>>>>>> I'm using 2.7.x. There's nothing obvious to me in the logs. If I run<br>
>>>>>>>> with --debug, I see:<br>
>>>>>>>> #########<br>
>>>>>>>> debug: Failed to load library 'rubygems' for feature 'rubygems'<br>
>>>>>>>> debug: Puppet::Type::User::ProviderDirectoryservice: file<br>
>>>>>>>> /usr/bin/dscl does not exist<br>
>>>>>>>> debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist<br>
>>>>>>>> debug: Puppet::Type::User::ProviderLdap: true value when expecting false<br>
>>>>>>>> debug: Puppet::Type::User::ProviderPw: file pw does not exist<br>
>>>>>>>> debug: Puppet::Type::File::ProviderMicrosoft_windows: feature<br>
>>>>>>>> microsoft_windows is missing<br>
>>>>>>>> debug: Failed to load library 'ldap' for feature 'ldap'<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/ssl/certs]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/ssl]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/ssl]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/certs/cuda-linux32-cvs4.pem]:<br>
>>>>>>>> Autorequiring File[/var/lib/puppet/ssl/certs]<br>
>>>>>>>> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]<br>
>>>>>>>> debug: /File[/var/run/puppet/agent.pid]: Autorequiring File[/var/run/puppet]<br>
>>>>>>>> debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]<br>
>>>>>>>> debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/state]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/ssl]<br>
>>>>>>>> debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl/private]: Autorequiring<br>
>>>>>>>> File[/var/lib/puppet/ssl]<br>
>>>>>>>> debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">>>>>>>>> debug: Stored state in 0.00 seconds<br>
>>>>>>>> notice: Finished catalog run in 0.50 seconds<br>
>>>>>>>> #########<br>
>>>>>>>><br>
>>>>>>>> On Thu, Sep 5, 2013 at 8:10 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
>>>>>>>>> That doesn't make any sense.<br>
>>>>>>>>><br>
>>>>>>>>> What version are you using? and what's in the logs? Have you tried<br>
>>>>>>>>> running with --debug?<br>
>>>>>>>>><br>
>>>>>>>>><br>
>>>>>>>>> On 5 September 2013 15:01, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>>>>>>>>>> I also tried with the FQDN, but that didn't make any difference. I<br>
>>>>>>>>>> also tried removing the default node definition, and that also had no<br>
>>>>>>>>>> impact. ntp is loaded regardless.<br>
>>>>>>>>>><br>
>>>>>>>>>> On Thu, Sep 5, 2013 at 1:56 AM, Federico Voges <<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>> wrote:<br>
>>>>>>>>>>> Hi Lonni,<br>
>>>>>>>>>>><br>
>>>>>>>>>>> Is 'cuda-farm-ljf1' the FQDN for the node? If not, put the full<br>
>>>>>>>>>>> hostname or use a regex.<br>
>>>>>>>>>>><br>
>>>>>>>>>>> Cheers,<br>
>>>>>>>>>>> Fed.<br>
>>>>>>>>>>><br>
>>>>>>>>>>> On 3 September 2013 23:06, Lonni J Friedman <<a href="mailto:netllama@gmail.com">netllama@gmail.com</a>> wrote:<br>
>>>>>>>>>>>> I'm trying to get ramped up on Puppet ( <a href="http://www.puppetlabs.com" target="_blank">http://www.puppetlabs.com</a> ),<br>
>>>>>>>>>>>> and I'm encountering some strange behavior with the node definitions.<br>
>>>>>>>>>>>> >From the documentation, I thought that the 'default' node was a<br>
>>>>>>>>>>>> catchall for any node which wasn't explicitly matched elsewhere.<br>
>>>>>>>>>>>> However, what I'm seeing is that the default seems to apply even where<br>
>>>>>>>>>>>> there is an exact match. For example, I have the following in<br>
>>>>>>>>>>>> site.pp:<br>
>>>>>>>>>>>><br>
>>>>>>>>>>>> #########<br>
>>>>>>>>>>>> import "services/*"<br>
>>>>>>>>>>>> node "cuda-farm-ljf1" {<br>
>>>>>>>>>>>> include hello<br>
>>>>>>>>>>>> }<br>
>>>>>>>>>>>> node default {<br>
>>>>>>>>>>>> include ntp<br>
>>>>>>>>>>>> }<br>
>>>>>>>>>>>> #########<br>
>>>>>>>>>>>><br>
>>>>>>>>>>>><br>
>>>>>>>>>>>> What I'd expect is that the 'ntp' class will *not* apply to the<br>
>>>>>>>>>>>> 'cuda-farm-ljf1' node, however that isn't the behavior that I'm<br>
>>>>>>>>>>>> seeing. Even if I completely uninstall ntp on that node, its<br>
>>>>>>>>>>>> reinstalled & started the next time it syncs with the master. Am I<br>
>>>>>>>>>>>> missing something obvious here?<br>
_______________________________________________<br>
Linux-users mailing list<br>
<a href="mailto:Linux-users@linux-sxs.org">Linux-users@linux-sxs.org</a><br>
<a href="http://mailman.celestial.com/mailman/listinfo/linux-users" target="_blank">http://mailman.celestial.com/mailman/listinfo/linux-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. -- Albert Einstein<br>Visit my web page at: <a href="http://david.bandel.us/" target="_blank">http://david.bandel.us/</a>
</div>