<div dir="ltr">Lonnie,<div><br></div><div>I&#39;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">&lt;<a href="mailto:netllama@gmail.com" target="_blank">netllama@gmail.com</a>&gt;</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 &lt;<a href="mailto:ftc@ftc.com.ar">ftc@ftc.com.ar</a>&gt; wrote:<br>

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