Re: [Puppet Users] Re: agent not launching on windows client

2022-05-23 Thread Andrew Jones
I'd be tempted to put a https://puppet.com/docs/puppet/5.5/types/notify.html
into your code temporarily to ensure that it's being enforced.
Try running `puppet resource service puppet ensure=running` in powershell
and see if you can switch it on manually from there.
Could there be some other agent or group policy that is shutting the puppet
service down?


On Mon, May 23, 2022 at 10:02 PM pko...@moleculevfx.com <
pko...@moleculevfx.com> wrote:

> Thank you!
>
> And instead I see:
> C:\Windows\system32>puppet resource service puppet
> service { 'puppet':
>   ensure   => 'stopped',
>   enable   => 'true',
>   logonaccount => 'LocalSystem',
>   provider => 'windows',
> }
>
> somy currrent code already has this:
> 'windows': {
>   service { 'puppet'  : ensure =>  'running', enable => true, }
> }
> I'll run puppet with debug and see what's happening...but basically, it
> doesn't seem like its saving the state.
>
> On Monday, May 23, 2022 at 3:17:03 PM UTC-4 andrew...@puppet.com wrote:
>
>> Open a power shell window and run `puppet resource service puppet` you
>> should see something like this;
>> PS C:\Users\Administrator> puppet resource service puppet
>> service { 'puppet':
>>   ensure   => 'running',
>>   enable   => 'true',
>>   logonaccount => 'LocalSystem',
>>   provider => 'windows',
>> }
>> This will tell you if the service is running.
>>
>> On Monday, May 23, 2022 at 6:32:29 PM UTC+1 pko...@moleculevfx.com wrote:
>>
>>> My current puppet.conf:
>>>
>>> [main]
>>> certname=windowscw.example.com
>>> server=puppet
>>> autoflush=true
>>> manage_internal_file_permissions=false
>>> environment=development
>>> runinterval=1800
>>>
>>> On Monday, May 23, 2022 at 1:17:57 PM UTC-4 pko...@moleculevfx.com
>>> wrote:
>>>
>>>> I've been struggling to get puppet agent 7.12 to run by itself on
>>>> windows 10. I'm watching for runs on the event viewer in Custom Views >
>>>> Administrative Events.
>>>> It seems that it will run dependably/independently if I
>>>> 1) change the puppet.conf "runinterval=30m" to "runinterval=1800" AND
>>>> 2) change Puppet Agent service to automatic AND
>>>> 3) after I run it manually at least once.
>>>>
>>>> The problem is that I need it to run withOUT being run manually.
>>>> Suggestions?
>>>>
>>> --
> 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/c8c344f5-8cac-47ba-a521-bc051f09a4ccn%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/c8c344f5-8cac-47ba-a521-bc051f09a4ccn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
*Andrew Jones*
Professional Services Engineer - EMEA
Mobile: +44 7767 635247 <+447552991554>
*Puppet. <http://puppet./> The shortest path to better software.*

-- 
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/CAH9xhhAUCUu8Pb5sZs5cbe-oo2LkAVTkF3JQyauisOvvXakzaw%40mail.gmail.com.


[Puppet Users] Re: agent not launching on windows client

2022-05-23 Thread Andrew Jones
Open a power shell window and run `puppet resource service puppet` you 
should see something like this;
PS C:\Users\Administrator> puppet resource service puppet
service { 'puppet':
  ensure   => 'running',
  enable   => 'true',
  logonaccount => 'LocalSystem',
  provider => 'windows',
}
This will tell you if the service is running. 

On Monday, May 23, 2022 at 6:32:29 PM UTC+1 pko...@moleculevfx.com wrote:

> My current puppet.conf:
>
> [main]
> certname=windowscw.example.com
> server=puppet
> autoflush=true
> manage_internal_file_permissions=false
> environment=development
> runinterval=1800
>
> On Monday, May 23, 2022 at 1:17:57 PM UTC-4 pko...@moleculevfx.com wrote:
>
>> I've been struggling to get puppet agent 7.12 to run by itself on windows 
>> 10. I'm watching for runs on the event viewer in Custom Views > 
>> Administrative Events.
>> It seems that it will run dependably/independently if I 
>> 1) change the puppet.conf "runinterval=30m" to "runinterval=1800" AND 
>> 2) change Puppet Agent service to automatic AND 
>> 3) after I run it manually at least once. 
>>
>> The problem is that I need it to run withOUT being run manually.
>> Suggestions?
>>
>

-- 
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/69ffe19b-c66b-4987-8d32-318fbb51f47en%40googlegroups.com.


[Puppet Users] Why do my SERVER certs get revoked?

2017-02-14 Thread Dayton Jones
I'm intermittently getting 
 Warning: SSL_connect returned=1 errno=0 state=SSLv3 read server 
certificate B: certificate verify failed: [certificate revoked for 
/CN=my.puppet.master] 

when clients try to connect...this is very random and could go months 
without the error, but I've got it several times in the last 3 days.  The 
"fix" is stop the puppetmaster, remove it's certs/regen and restart 
puppetmaster and then have the clients reattempt the connection...

But WHY is the cert getting revoked?  What can I look at to see why this 
happens, I've checked the logs but don't see anything that sticks out... 
 Server/clients are all synced and agree on the time, DNS is working 
properly... any pointers would be greatly appreciated.

-- 
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/0f6ae8c3-91b4-47b5-8df4-ce7e79568b45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] What is the limit of nodes mcollective and activemq can maintain?

2016-11-03 Thread Dayton Jones
I've seen posts of the "800 node wall" with mcollective/activemq, but 
nothing recent 
(http://ramblings.narrabilis.com/books/masteringpuppet/mcollective).  

Is there a logical limit of nodes that a collective can contain?  I'm 
working in an environment that currently has about 27,000 nodes - they are 
broken up into separate collectives, but some collectives have several 
thousand nodes (up to 9,000) and growing.  Running "mco inventory --lc" 
will most times report back in the 27k range, but more and more that number 
is significantly less (with some collectives not even showing up) - in the 
hundreds instead of 10's of thousands...

Stopping and restarting the activemq brokers, will "fix" this most of the 
time.

Running puppet 3.6.2, mcollective-puppet 1.7.2, and activemq 5.9.1

Currently have 7 collectives configured, each collective has either one or 
two brokers, but the "main" broker (and the largest collective) has 3 
brokers (master +2 slaves)


~]$ mco inventory --lc --dt=120

   Collective Nodes 
   == =
   col5_mcollective   136
   col4_mcollective   282
   col2_mcollective1276
   col7_mcollective   3059
   col6_mcollective3451
   col3_mcollective   6744
   col1_mcollective12115
   mcollective27064

 Total nodes: 27064


~]$ mco inventory --lc --dt=120



Collective Nodes
   == =
   col5_mcollective   138
   col4_mcollective   284
   col7_mcollective   3062
   col6_mcollective3433
   mcollective6918

 Total nodes: 6918

-- 
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/f075a078-1dee-49a8-bb5f-56fcc2dee5bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: hiera-eyaml - masterless puppet

2016-10-04 Thread Nathan Jones
hiera-eyaml-kms  is a good 
solution that uses AWS KMS to manage encryption keys. EC2 instances can be 
provisioned with an IAM instance profile that grants access to the required 
keys.


-- 
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/261e20fe-604b-484b-b6e9-94b5550b3932%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Logging output of a long running exec

2015-12-15 Thread Dayton Jones
Ah no...not in this case.  I need to see the output of the script in the 
puppet log/on screen so immediate action (if any) can be taken care of... 

I'm wondering (though I haven't been able to corroborate) if there is a 
buffer limit for the exec function and the script is just spewing too much 
for puppet to capture... 

On Tuesday, December 15, 2015 at 12:16:04 PM UTC-6, Steve Traylen wrote:
>
> In this case the screen session stays forever and you can connect to it 
> later to see the output. That may or may not be useful to you of course 
> ---
> Steve Traylen
>
> *From:* Dayton Jones >
> *Sent:* 15 Dec 2015 1:02 pm
> *To:* Puppet Users
> *Subject:* Re: [Puppet Users] Logging output of a long running exec
>
> Does that show the output during the puppet run though?  I "need" to have 
> the output of the script show up, hence the "logoutput => true" directive 
> which I don't see in your example.  The script runs just fine, I just don't 
> get any output/status from it when run via puppet.  
>
> On Tuesday, December 15, 2015 at 3:56:14 AM UTC-6, Steve Traylen wrote: 
>>
>> Example of long exec running backgrounded in a screen.
>>
>> exec { 'zrep_initial_sync': 
>> command => "screen -dmS zrep_initial_sync /usr/local/sbin/krb_me.sh 
>> /usr/local/sbin/zrep init ${src_vol} ${dst_host} ${dst_vol}", onlyif => 
>> "zfs get -H zrep:src-fs -o value ${src_vol} | grep -qv ${src_vol}", path => 
>> ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin', 
>> '/usr/local/sbin'], }
>> Sent from Nine <http://www.9folders.com/>
>>
>> *From:* Dayton Jones 
>> *Sent:* 11 Dec 2015 9:45 pm
>> *To:* Puppet Users
>> *Subject:* [Puppet Users] Logging output of a long running exec
>>
>> I have a legacy "provisioning" script that I'm calling with puppet on 
>> brand new machines (I'm slowly taking the functionality out of the script 
>> and into puppet, but for reasons I can't do a full replacement yet) 
>>
>> I'd like to log the output of the provisioning and have included 
>> "logoutput" to the exec in the class (see below) but when I run puppet all 
>> I get for the module/class is:
>>
>> Warning: Waiting for output; will sleep 0.0 seconds
>>
>> Warning: Waiting for output; will sleep 0.5 seconds
>>
>> Warning: Could not get output
>>
>> Notice: /Stage[post]/provision/Exec[provision.sh]/returns: executed 
>> successfully
>>
>> Notice: Finished catalog run in 107.80 seconds
>>
>>
>>
>> Here is the class and exec... I'm setting a timeout of 1800 and if the 
>> catalog run finishes in 107 seconds, I'm unclear on how it's timing out. 
>>  Any suggestions?
>>
>> class provision { 
>>
>>
>>   notify {'Running provision.sh can take a while - be patient':}
>>
>>
>>   file { '/root/provision.sh' :
>>
>> ensure => file,
>>
>> owner  => 'root',
>>
>> group  => 'root',
>>
>> mode   => '0755',
>>
>> source => 'puppet:///modules/provision/provision.sh',
>>
>> notify => Exec['provision.sh'],
>>
>>   }
>>
>>
>>   exec { 'provision.sh' :
>>
>> command   => '/root/provision.sh',
>>
>> logoutput => true,
>>
>> timeout   => 1800,
>>
>> cwd   => '/root';
>>
>>   }
>>
>> }
>>
>> -- 
>> 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/msgid/puppet-users/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%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/msgid/puppet-users/8dc78f95-4c00-4693-b659-9cdad3dc9ade%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/8dc78f95-4c00-4693-b659-9cdad3dc9ade%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/afe78121-e297-4f69-8a05-f8a45f5189d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Logging output of a long running exec

2015-12-15 Thread Dayton Jones
Does that show the output during the puppet run though?  I "need" to have 
the output of the script show up, hence the "logoutput => true" directive 
which I don't see in your example.  The script runs just fine, I just don't 
get any output/status from it when run via puppet.  

On Tuesday, December 15, 2015 at 3:56:14 AM UTC-6, Steve Traylen wrote:
>
> Example of long exec running backgrounded in a screen.
>
> exec { 'zrep_initial_sync': 
> command => "screen -dmS zrep_initial_sync /usr/local/sbin/krb_me.sh 
> /usr/local/sbin/zrep init ${src_vol} ${dst_host} ${dst_vol}", onlyif => 
> "zfs get -H zrep:src-fs -o value ${src_vol} | grep -qv ${src_vol}", path => 
> ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin', 
> '/usr/local/sbin'], }
> Sent from Nine <http://www.9folders.com/>
>
> *From:* Dayton Jones >
> *Sent:* 11 Dec 2015 9:45 pm
> *To:* Puppet Users
> *Subject:* [Puppet Users] Logging output of a long running exec
>
> I have a legacy "provisioning" script that I'm calling with puppet on 
> brand new machines (I'm slowly taking the functionality out of the script 
> and into puppet, but for reasons I can't do a full replacement yet) 
>
> I'd like to log the output of the provisioning and have included 
> "logoutput" to the exec in the class (see below) but when I run puppet all 
> I get for the module/class is:
>
> Warning: Waiting for output; will sleep 0.0 seconds
>
> Warning: Waiting for output; will sleep 0.5 seconds
>
> Warning: Could not get output
>
> Notice: /Stage[post]/provision/Exec[provision.sh]/returns: executed 
> successfully
>
> Notice: Finished catalog run in 107.80 seconds
>
>
>
> Here is the class and exec... I'm setting a timeout of 1800 and if the 
> catalog run finishes in 107 seconds, I'm unclear on how it's timing out. 
>  Any suggestions?
>
> class provision { 
>
>
>   notify {'Running provision.sh can take a while - be patient':}
>
>
>   file { '/root/provision.sh' :
>
> ensure => file,
>
> owner  => 'root',
>
> group  => 'root',
>
> mode   => '0755',
>
> source => 'puppet:///modules/provision/provision.sh',
>
> notify => Exec['provision.sh'],
>
>   }
>
>
>   exec { 'provision.sh' :
>
> command   => '/root/provision.sh',
>
> logoutput => true,
>
> timeout   => 1800,
>
> cwd   => '/root';
>
>   }
>
> }
>
> -- 
> 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/msgid/puppet-users/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8dc78f95-4c00-4693-b659-9cdad3dc9ade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Logging output of a long running exec

2015-12-11 Thread Dayton Jones
I have a legacy "provisioning" script that I'm calling with puppet on brand 
new machines (I'm slowly taking the functionality out of the script and 
into puppet, but for reasons I can't do a full replacement yet)

I'd like to log the output of the provisioning and have included 
"logoutput" to the exec in the class (see below) but when I run puppet all 
I get for the module/class is:

Warning: Waiting for output; will sleep 0.0 seconds

Warning: Waiting for output; will sleep 0.5 seconds

Warning: Could not get output

Notice: /Stage[post]/provision/Exec[provision.sh]/returns: executed 
successfully

Notice: Finished catalog run in 107.80 seconds



Here is the class and exec... I'm setting a timeout of 1800 and if the 
catalog run finishes in 107 seconds, I'm unclear on how it's timing out. 
 Any suggestions?

class provision { 


  notify {'Running provision.sh can take a while - be patient':}


  file { '/root/provision.sh' :

ensure => file,

owner  => 'root',

group  => 'root',

mode   => '0755',

source => 'puppet:///modules/provision/provision.sh',

notify => Exec['provision.sh'],

  }


  exec { 'provision.sh' :

command   => '/root/provision.sh',

logoutput => true,

timeout   => 1800,

cwd   => '/root';

  }

}

-- 
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/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Passing a generated variable inside a template...how?

2015-11-30 Thread Dayton Jones
Ah...nevermind, figured this out!

Sorting (well, reverse sorting so lo0 gets put first):
<% @interfaces.split(',').sort!{|x, y| y <=> x}.each do |int| if 
has_variable?("ipaddress_#{int}") -%>

Splitting:
<% fqdn =  Resolv.getname(scope["ipaddress_#{int}"]) -%>
<% name = (fqdn.split('.')) -%>
<%= scope["ipaddress_#{int}"] -%> <%= fqdn -%> <%= name.first %>


On Monday, November 30, 2015 at 8:52:00 AM UTC-6, Dayton Jones wrote:
>
> Ok... I switched tactics somewhat and have more or less what I wanted:
>
> === start ERB file ===
> <% @interfaces.split(',').each do |int| if 
> has_variable?("ipaddress_#{int}") -%>
> <%= scope["ipaddress_#{int}"] -%> <%= 
> Resolv.getname(scope["ipaddress_#{int}"]) -%>
> <% end -%>
> <% end -%>
> === end ERB file ===
>
> this will give the the IP and associated FQDN of all the interfaces but I 
> was wondering if the community could give me a little more help..
>
> 1) Once I have all the interfaces/names, how can I split the FQDN and get 
> the short name (myhost vs myhost.domain.com)
> 2) Is there a way to order the output (put 127.0.0.1 at the top, etc)?
>
>
> On Wednesday, November 25, 2015 at 2:25:22 PM UTC-6, Dayton Jones wrote:
>>
>> I'm writing a template to populate a file - easy enough...
>>
>> What I want is to to grab the list of interfaces, get the ip assigned to 
>> that interface and then do a lookup of the ip to get the dns name.
>>
>> I'm able to get the interfaces/ips just fine, but can't figure out how to 
>> then pass the IP to the function to do the lookup.  Any help is greatly 
>> appreciated...
>>
>> ===
>> start ERB
>>
>> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
>> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
>> <% @int_name = Resolv.new.getname @int_ip %>
>> ...
>> <% end %>
>>
>> end ERB
>> 
>>
>> @int_ip gets popluated and I can manipulate it as needed, but how do I 
>> properly pass it to 'Resolv.new.getname' to set the int_name string?
>>
>

-- 
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/8a361168-e034-475d-ac9b-898abcd04a10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Passing a generated variable inside a template...how?

2015-11-30 Thread Dayton Jones
Ok... I switched tactics somewhat and have more or less what I wanted:

=== start ERB file ===
<% @interfaces.split(',').each do |int| if 
has_variable?("ipaddress_#{int}") -%>
<%= scope["ipaddress_#{int}"] -%> <%= 
Resolv.getname(scope["ipaddress_#{int}"]) -%>
<% end -%>
<% end -%>
=== end ERB file ===

this will give the the IP and associated FQDN of all the interfaces but I 
was wondering if the community could give me a little more help..

1) Once I have all the interfaces/names, how can I split the FQDN and get 
the short name (myhost vs myhost.domain.com)
2) Is there a way to order the output (put 127.0.0.1 at the top, etc)?


On Wednesday, November 25, 2015 at 2:25:22 PM UTC-6, Dayton Jones wrote:
>
> I'm writing a template to populate a file - easy enough...
>
> What I want is to to grab the list of interfaces, get the ip assigned to 
> that interface and then do a lookup of the ip to get the dns name.
>
> I'm able to get the interfaces/ips just fine, but can't figure out how to 
> then pass the IP to the function to do the lookup.  Any help is greatly 
> appreciated...
>
> ===
> start ERB
>
> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> ...
> <% end %>
>
> end ERB
> 
>
> @int_ip gets popluated and I can manipulate it as needed, but how do I 
> properly pass it to 'Resolv.new.getname' to set the int_name string?
>

-- 
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/3a83c101-2ad4-4ca4-ba3a-c8fe2295a7bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Dayton Jones
Yep...the IP's are all resolvable, and if I hardcode one of them in to the 
Resolv... line, it works and writes to the file... so I have no idea why 
passing @int_ip to Resolv (instead of the hardcoded IP) fails...

Thanks again for the help...

On Wednesday, November 25, 2015 at 4:04:00 PM UTC-6, denmat wrote:
>
> No, it is the same for the this test. You do need to have a resolvable IP 
> address for each interface IP it finds or it will error. For example I had 
> to add hostnames in my /etc/hosts file for my vagrant IPs (10.0.2.15, 
> 172.28.128.5). 
>
> That maybe the error you're seeing there, "cannot interpret as address".
>
> On Thu, Nov 26, 2015 at 8:54 AM, Dayton Jones  > wrote:
>
>> First, thanks for the help - I've been banging my head against the wall 
>> too much on this.
>>
>> Unfortunately, it's still not working for me..  
>>
>> I'm not using an inline template, I have an actual .erb file called out 
>> in my manifest - though I don't see why this would be any different.
>>
>> my erb now looks like:
>>
>> <% scope.lookupvar("interfaces").split(",").each do |interface| %>
>> <% @int_ip = scope.lookupvar("ipaddress_" + interface) %>
>> <% @int_name = Resolv.new.getname @int_ip %>
>> <%= "#{@int_ip}  #{@int_name}" %>
>> <% end %>
>>
>> (thanks, didn't realize I'd mixed up the single/double quotes)
>>
>> and here is the result when puppet runs and the class is applied:
>>
>>   Filepath: /usr/lib/ruby/1.8/resolv.rb
>>   Line: 429
>>   Detail: cannot interpret as address: 
>>
>>
>> Is there a difference in using an inline template inside of the class 
>> defintion as opposed to using an erb file called as a resource?
>>
>>>
>>> -- 
>> 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/msgid/puppet-users/f15d30b2-2be4-4267-a8eb-9c19bbb63034%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/f15d30b2-2be4-4267-a8eb-9c19bbb63034%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1fdbbe47-4e4f-4ede-8226-cba9f2f90fb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Dayton Jones
First, thanks for the help - I've been banging my head against the wall too 
much on this.

Unfortunately, it's still not working for me..  

I'm not using an inline template, I have an actual .erb file called out in 
my manifest - though I don't see why this would be any different.

my erb now looks like:

<% scope.lookupvar("interfaces").split(",").each do |interface| %>
<% @int_ip = scope.lookupvar("ipaddress_" + interface) %>
<% @int_name = Resolv.new.getname @int_ip %>
<%= "#{@int_ip}  #{@int_name}" %>
<% end %>

(thanks, didn't realize I'd mixed up the single/double quotes)

and here is the result when puppet runs and the class is applied:

  Filepath: /usr/lib/ruby/1.8/resolv.rb
  Line: 429
  Detail: cannot interpret as address: 


Is there a difference in using an inline template inside of the class 
defintion as opposed to using an erb file called as a resource?

>
>

-- 
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/f15d30b2-2be4-4267-a8eb-9c19bbb63034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Dayton Jones
Right, that works -- but I want to get the IP by using the scope.lookup var 
and not hardcode an IP in the template.  I know both the 
"scope.lookupvar('ipaddress_'+interface)" and "@int_name = 
Resolv.new.getname " works, but I'm struggling on how to send the IP 
gained from the lookupvar to the Resolv.new.getname function inside the 
template.. It should just be a syntax issue, but I'm new to ruby/erb  so 
I'm not sure the correct way to pass a generated string to a function 
within the same structure... 

On Wednesday, November 25, 2015 at 3:10:55 PM UTC-6, denmat wrote:
>
> Sorry, rushing around on trains. Try this:
>
> irb(main):002:0> require 'resolv'
> => true
> irb(main):003:0> Resolv.new.getname('127.0.0.1')
> => "localhost"
>
> On Thu, Nov 26, 2015 at 7:54 AM, Denmat > 
> wrote:
>
>> Sorry, ignore my suggestion. That won't work.
>>
>> On 26 Nov 2015, at 06:57, Dayton Jones > 
>> wrote:
>>
>> I'm writing a template to populate a file - easy enough...
>>
>> What I want is to to grab the list of interfaces, get the ip assigned to 
>> that interface and then do a lookup of the ip to get the dns name.
>>
>> I'm able to get the interfaces/ips just fine, but can't figure out how to 
>> then pass the IP to the function to do the lookup.  Any help is greatly 
>> appreciated...
>>
>> ===
>> start ERB
>>
>> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
>> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
>> <% @int_name = Resolv.new.getname @int_ip %>
>> ...
>> <% end %>
>>
>> end ERB
>> 
>>
>> @int_ip gets popluated and I can manipulate it as needed, but how do I 
>> properly pass it to 'Resolv.new.getname' to set the int_name string?
>>
>> -- 
>> 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/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/14fe0e25-b0b6-4118-8212-87734e580029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Dayton Jones
I'm writing a template to populate a file - easy enough...

What I want is to to grab the list of interfaces, get the ip assigned to 
that interface and then do a lookup of the ip to get the dns name.

I'm able to get the interfaces/ips just fine, but can't figure out how to 
then pass the IP to the function to do the lookup.  Any help is greatly 
appreciated...

===
start ERB

<% scope.lookupvar('interfaces').split(",").each do |interface| %>
<% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
<% @int_name = Resolv.new.getname @int_ip %>
...
<% end %>

end ERB


@int_ip gets popluated and I can manipulate it as needed, but how do I 
properly pass it to 'Resolv.new.getname' to set the int_name string?

-- 
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/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Issues in setting up puppet agent and master configuratuon

2014-01-13 Thread Morris Jones
Anil, I ran into this problem as well. Here's the solution:

puppetdb binds to learn.localdomain at startup for the https service, as 
you can see in /etc/puppetlabs/puppetdb/conf.d/jetty.ini.

The problem you have is probably the same as the one I had. I edited 
/etc/hosts to move learn.localdomain to the assigned IP address in place of 
127.0.0.1, but did not restart pe-puppetdb. So the IP binding didn't 
change, and it only answered on localhost.

Do this after editing /etc/hosts: /etc/init.d/pe-puppetdb restart

Best regards,
Mojo

On Thursday, December 5, 2013 1:23:07 PM UTC-8, anil maddipatla wrote:
>
> I was going over a related post in puppet developers (unfortunately seems 
> to wrong place for my questions )and my questions are pasted on the top of 
> the chain.
>
> Hi Chris,
>   I exactly have the same problem.
>
>
>
> ###3
> [root@anilAgent ~]# puppet agent --test
> Info: Caching certificate for agent1.localdomain
> Info: Caching certificate_revocation_list for ca
> Warning: Unable to fetch my node definition, but the agent run will 
> continue:
> Warning: Error 400 on SERVER: Could not retrieve facts for 
> agent1.localdomain: Failed to find facts from PuppetDB at 
> learn.localdomain:8081: Connection refused - connect(2)
> Info: Retrieving plugin
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/postgresql/lib/facter/postgres_default_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/concat/lib/facter/concat_basedir.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/auth_conf/lib/facter/custom_auth_conf.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/ip6tables_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/pe_puppetdb/lib/facter/puppetdb_server_status.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/pe_common/lib/facter/windows.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Failed to submit 'replace facts' command for agent1.localdomain to PuppetDB 
> at learn.localdomain:8081: Connection refused - connect(2)
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> #
>
>
>
>  I have downloaded the learn puppet vm and have 2 instances of it running 
> adn from 2 days struggling to get both behave as master and agent.
>
> In my case 
>
> #
> [root@learn manifests]# service pe-puppetdb status
> pe-puppetdb (pid  1110) is running...
>
>
> [root@learn manifests]# telnet localhost 8081
> Trying 127.0.0.1...
> Connected to localhost.
>
> ##
>
> But when i try telnet using ip it doesnt work.I am sorry i am not a linux 
> guy (basically trying to find my head around puppet) .
>
> Can you please let me know a solution or a way to move forward.
>
> Regards
> anil
>
> On Wednesday, July 10, 2013 8:07:57 PM UTC+5:30, Chris Price wrote:
>>
>> It's also possible that PuppetDB is not running due to the postgres 
>> error.  On the PuppetDB machine, you can run these to find out:
>>
>> service pe-puppetdb status
>> telnet localhost 8081
>>
>> PuppetDB logs can be found in /var/log/pe-puppetdb/

[Puppet Users] Re: Baffled by variable scope problem

2013-10-24 Thread Bob Jones


On Thursday, October 24, 2013 9:27:58 AM UTC-4, jcbollinger wrote:
>
>
>
> On Wednesday, October 23, 2013 10:07:37 AM UTC-5, Bob Jones wrote:
>>
>> Hello all.  I have been banging my head against this problem and I cannot 
>> for the life of me determine what is wrong.  We are running Puppet v3.2.2. 
>>  Here's the situation:
>>
>> We have a module called domex.  The domex modules has an init.pp that 
>> defines a domex class.  Various things happen in that module, but the 
>> important part is some variable definitions, so I'll whittle it down.
>>
>> init.pp:
>> class domex {
>>   $nifi_dir = 
>> extlookup('nifi_install_base_dir','/opt/niagarafiles/default','iep')
>>   $storm_streaming_pkg_reqs = "infrastructure-deps-iep-storm-addon"
>> }
>>
>> I've put notify statements in so I can verify the contents of the 
>> variables are correct in the init.pp and they are.
>>
>> Now, I have two subclasses, each defined in their own files.
>>
>>
>
> Nitpick: the classes you describe next are not *sub*classes; those 
> involve class inheritance.  Yours are simply other classes in the module.
>

You're right, sorry.  When I started working on these modules they were 
subclasses that inherited domex instead of the include, but that didn't 
work either and seemed to be against best practice.
 

>  
>
>> nifi.pp:
>> class domex::nifi {
>>   include domex
>>   $nifi_dir   = $domex::nifi_dir
>> }
>>
>> A notify statement shows that $nifi_dir gets populated with the correct 
>> value.
>>
>> storm.pp
>> class domex::storm {
>>   include domex
>>   $storm_pkg_reqs = $domex::storm_streaming_pkg_reqs
>> }
>>
>> In this case, $storm_pkg_reqs ends up no value.  The value of 
>> $domex::storm_streaming_pkg_reqs also has no value.
>>
>> Nothing else touches any of these variables in any other manifest.  I do 
>> not the reason $storm_pkg_reqs ends up being undefined.  I know this setup 
>> seems a bit convoluted, but it's not my choice, I'm having to take existing 
>> puppet modules and tweak them for our environment, so wholesale structural 
>> changes are out of the question (no matter how much I might like to make 
>> them).
>>
>> Any and all help would be greatly appreciated!
>>
>>
>
> I do not see any problem with the code you posted.  Are you certain it is 
> exactly what appears in your manifests?  The behavior you describe could 
> easily be explained by a difference between init.pp and storm.pp in the 
> spelling of the variable name.  Perhaps something subtle such as an 
> accidentally doubled underscore somewhere.
>

This was my initiial thought as well, but I copied and pasted the values of 
each variable and did searches for them in vim and the proper variables 
were found, so it's not a naming issue.

To expand a little, it seems none of the variables in the domex::storm 
class, all of which reference $domex::var are getting properly evaluated, 
whereas the ones in domex::nifi class are.  They both have the include 
domex line and that's it.  It has to be something obvious that I'm missing, 
but I just can't see what.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Baffled by variable scope problem

2013-10-24 Thread Bob Jones
I guess I'm not the only one stumped by this problem.  :)

Bob

On Wednesday, October 23, 2013 11:07:37 AM UTC-4, Bob Jones wrote:
>
> Hello all.  I have been banging my head against this problem and I cannot 
> for the life of me determine what is wrong.  We are running Puppet v3.2.2. 
>  Here's the situation:
>
> We have a module called domex.  The domex modules has an init.pp that 
> defines a domex class.  Various things happen in that module, but the 
> important part is some variable definitions, so I'll whittle it down.
>
> init.pp:
> class domex {
>   $nifi_dir = 
> extlookup('nifi_install_base_dir','/opt/niagarafiles/default','iep')
>   $storm_streaming_pkg_reqs = "infrastructure-deps-iep-storm-addon"
> }
>
> I've put notify statements in so I can verify the contents of the 
> variables are correct in the init.pp and they are.
>
> Now, I have two subclasses, each defined in their own files.
>
> nifi.pp:
> class domex::nifi {
>   include domex
>   $nifi_dir   = $domex::nifi_dir
> }
>
> A notify statement shows that $nifi_dir gets populated with the correct 
> value.
>
> storm.pp
> class domex::storm {
>   include domex
>   $storm_pkg_reqs = $domex::storm_streaming_pkg_reqs
> }
>
> In this case, $storm_pkg_reqs ends up no value.  The value of 
> $domex::storm_streaming_pkg_reqs also has no value.
>
> Nothing else touches any of these variables in any other manifest.  I do 
> not the reason $storm_pkg_reqs ends up being undefined.  I know this setup 
> seems a bit convoluted, but it's not my choice, I'm having to take existing 
> puppet modules and tweak them for our environment, so wholesale structural 
> changes are out of the question (no matter how much I might like to make 
> them).
>
> Any and all help would be greatly appreciated!
>
> Thanks,
> Bob
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Baffled by variable scope problem

2013-10-23 Thread Bob Jones
Hello all.  I have been banging my head against this problem and I cannot 
for the life of me determine what is wrong.  We are running Puppet v3.2.2. 
 Here's the situation:

We have a module called domex.  The domex modules has an init.pp that 
defines a domex class.  Various things happen in that module, but the 
important part is some variable definitions, so I'll whittle it down.

init.pp:
class domex {
  $nifi_dir = 
extlookup('nifi_install_base_dir','/opt/niagarafiles/default','iep')
  $storm_streaming_pkg_reqs = "infrastructure-deps-iep-storm-addon"
}

I've put notify statements in so I can verify the contents of the variables 
are correct in the init.pp and they are.

Now, I have two subclasses, each defined in their own files.

nifi.pp:
class domex::nifi {
  include domex
  $nifi_dir   = $domex::nifi_dir
}

A notify statement shows that $nifi_dir gets populated with the correct 
value.

storm.pp
class domex::storm {
  include domex
  $storm_pkg_reqs = $domex::storm_streaming_pkg_reqs
}

In this case, $storm_pkg_reqs ends up no value.  The value of 
$domex::storm_streaming_pkg_reqs also has no value.

Nothing else touches any of these variables in any other manifest.  I do 
not the reason $storm_pkg_reqs ends up being undefined.  I know this setup 
seems a bit convoluted, but it's not my choice, I'm having to take existing 
puppet modules and tweak them for our environment, so wholesale structural 
changes are out of the question (no matter how much I might like to make 
them).

Any and all help would be greatly appreciated!

Thanks,
Bob

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: if defined not working when class is enlcosed within Class[ ]

2013-08-19 Thread Florian Gray Jones
ok, that's great. Thanks for the help.

The puppet-docs it says: "*Modules are how Puppet finds the classes and 
types it can use* — it automatically loads any 
class<http://docs.puppetlabs.com/puppet/2.7/reference/lang_classes.html>
 or defined 
type<http://docs.puppetlabs.com/puppet/2.7/reference/lang_defined_types.html> 
stored 
in its modules."

With this in mind, if "*if *defined(Class[ ])" checks for classes.. and in 
my case 'supervisor::service' is as you mentioned not a class but a define. 
Is there an equivalent like "if defined(Define[ ])" or is best practice to 
continue using "if defined('supervisor::service')" to just check for 
anything of that name.

Thanks again
fLo



On Monday, 19 August 2013 23:33:09 UTC+8, Florian Gray Jones wrote:
>
> Hi,
>
> I am learning puppet using version 2.7.18 on a fresh ubuntu install.
>
> I am trying to test this module 
> https://github.com/liamjbennett/puppet-sabnzbd/blob/master/manifests/init.ppbut
>  I'm having trouble with the 
> if defined(Class['supervisor::service']) section in that it doesn't get 
> run even though the supervisor module is installed.
>
> If i put "else{ notice("supervisor not defined?") }" on the end then I see 
> that notice msg in the 'puppet apply --debug' output.
>
> This supervisor module is downloaded/installed OK from Puppet Forge and 
> if I either 
>
> a) comment out the 'if defined' then it works as expected 
> b) *change the if *defined(Class['supervisor::service']) to read if 
> defined('supervisor::service') then it also works as expected.
>
> As you can see there is an "include supervisor" at top of the class which 
> I'm guessing isn't being called in the 
> order needed for the 'if defined' to work and the one without the Class[] 
> must work because puppet auto loads the modules from the modulepath
> and checks if that namespace and module exist?
>
> This is all new to me so i could be very wrong but can anyone explain 
> given that init.pp why the 'if defined' isn't working and what is the best
> way to achieve what the 'if defined' is there for and that's to see if the 
> supervisor module is installed/loaded before entering the if statement and 
> using the module?
>
> Many thanks for reading
> fLo
>
>
>
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] if defined not working when class is enlcosed within Class[ ]

2013-08-19 Thread Florian Gray Jones
Hi,

I am learning puppet using version 2.7.18 on a fresh ubuntu install.

I am trying to test this module 
https://github.com/liamjbennett/puppet-sabnzbd/blob/master/manifests/init.ppbut 
I'm having trouble with the 
if defined(Class['supervisor::service']) section in that it doesn't get run 
even though the supervisor module is installed.

If i put "else{ notice("supervisor not defined?") }" on the end then I see 
that notice msg in the 'puppet apply --debug' output.

This supervisor module is downloaded/installed OK from Puppet Forge and if 
I either 

a) comment out the 'if defined' then it works as expected 
b) *change the if *defined(Class['supervisor::service']) to read if defined(
'supervisor::service') then it also works as expected.

As you can see there is an "include supervisor" at top of the class which 
I'm guessing isn't being called in the 
order needed for the 'if defined' to work and the one without the Class[ ] 
must work because puppet auto loads the modules from the modulepath
and checks if that namespace and module exist?

This is all new to me so i could be very wrong but can anyone explain given 
that init.pp why the 'if defined' isn't working and what is the best
way to achieve what the 'if defined' is there for and that's to see if the 
supervisor module is installed/loaded before entering the if statement and 
using the module?

Many thanks for reading
fLo



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: All Hosts Shown as Unresponsive. Worker Restart Fails. Clients Seem Happy?

2013-04-01 Thread Erik Jones
There is a pid file in /var/run/puppet-dashboard.pid, but this file isn't 
what's stopping the startup.  Puppet Dashboard also stores PID information 
in /usr/share/puppet-dashboard/tmp/pids.  You must remove 
/var/run/puppet-dashboard.pid and /usr/share/puppet-dashboard/tmp/pids/*. 
 Then you'll be able to start it just fine.  Modifying the CPU settings 
only enables additional workers, but doesn't actually unblock the first two 
that won't start.  

The bug is that it actually doesn't check to make sure there are still 
processes running on those pids listed in 
the /usr/share/puppet-dashboard/tmp/pids/*.pid files.  

Erik

On Tuesday, December 11, 2012 5:55:56 PM UTC-8, Dave Mankoff wrote:
>
> [On my dev server] For the past 3 days, my puppet master has shown all of 
> the hosts as unresponsive. However, when I log into one of the hosts and 
> run "puppet agent --test" everything seems to run without complaint. 
> Meanwhile the master shows an ever increasing number of pending tasks.
>
> When I try to restart the dashboard workers, I get the following:
>
> # /etc/init.d/pe-puppet-dashboard-workers restart
>  * Restarting PE Puppet Dashboard Workers
> ERROR: there is already one or more instance(s) of the program running
> ERROR: there is already one or more instance(s) of the program running
>  * PE Puppet Dashboard Worker (pid ) is not running
>   
> [fail]
>
> Rebooting the computer does not seem to help. For that matter, I think 
> this problem started after a recent system update and reboot. It is running 
> Ubuntu 12.04. I can not seem to find anything meaningful in the logs, 
> though perhaps I am looking in the wrong places. Any advice? Things worked 
> fine just a few days ago, and I have not touched Puppet.
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Meetup Australia (Melbourne, Sydney, Brisbane)

2012-11-04 Thread Matthew Jones
I'll see you all on Thursday.

On Monday, 5 November 2012 11:42:52 UTC+11, Stephen Johnson wrote:
>
> The Melbourne location has been decided
>
> Beer DeLuxe on Federation Square, Thursday 8/11/2012 5.30pm 
>
> On Monday, November 5, 2012 11:11:19 AM UTC+11, denmat wrote:
>>
>> I would be glad to meetup in Melb.
>>
>> On 05/11/2012, at 9:58, Stephen Johnson  wrote:
>>
>> Hi
>> I currently in Australia, as im the instructor on the Puppet 
>> Fundamentals * courses in Melbourne, Sydney and Brisbane and just wondered 
>> if anyone fancied meeting up and talking about puppet, hiera, puppetdb, 
>> devops etc etc.  
>>
>> As i dont live here any feedback on locations would help, if not ill 
>> randomly pick on closer to the time. 
>>
>> Melbourne
>>  
>> Thursday 8/11/2012 5.30pm (Location to be decided) 
>>
>> Sydney
>>
>> Thursday 15/11/2012 5.30pm (Location to be decided) 
>>
>> Brisbane
>>
>> Thursday 22/11/2012 5.30pm (Location to be decided) 
>>
>>
>> *
>>
>> http://puppetlabs.com/events/melbourne-puppet-fundamentals-training-melbourne-november-2012/
>>
>> http://puppetlabs.com/events/sydney-puppet-fundamentals-sydney-november2012/
>>
>> http://puppetlabs.com/events/puppet-fundamentals-training-brisbane-australia/
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/puppet-users/-/l41Yb2fjkrwJ.
>> To post to this group, send email to puppet...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/sJYQhfB0wPkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: puppet facts.d executable PROBLEM

2012-10-11 Thread Jones
It's finally working some guy thought it's a good idea to comment the 
part out in the factsd script ^^

Am Donnerstag, 11. Oktober 2012 15:24:57 UTC+2 schrieb Jones:
>
> Hi folks,
>
> I'm using this plugin 
> https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
> and I can't get a fact out of a simple shell script. YAML TXT JSON works 
> well
>
> My little shell script testfact.sh looks like
>
> #!/bin/bash
> echo "TEST=NOT WORKING"
>
> made it executable
> chmod +x testfact.sh
>
> made a puppet agent -t to read the new fact
>
> BUT 
> $facter --puppet 
> is not getting the fact
>
> Thanx a lot!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Ur5j_wsgjQsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] puppet facts.d executable PROBLEM

2012-10-11 Thread Jones
Hi folks,

I'm using this 
plugin https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
and I can't get a fact out of a simple shell script. YAML TXT JSON works 
well

My little shell script testfact.sh looks like

#!/bin/bash
echo "TEST=NOT WORKING"

made it executable
chmod +x testfact.sh

made a puppet agent -t to read the new fact

BUT 
$facter --puppet 
is not getting the fact

Thanx a lot!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ozS0Ol78TNoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Service[ssh] not known - Debian

2012-09-20 Thread Jones
Hi folks,

has my puppet nuts?

It worked perfectly. It's too bad that we don't have monday... that would 
explain everything :D

example:

*sshd_config{*
*"PermitRootLogin": value => "no",*
*notify => Service['ssh'],*
*}*


Am I stupid?

puppet version: 2.7.18
on Debian Wheezy

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/vFZm87wlKSQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] external facts - debian

2012-08-30 Thread Jones
Hi,

1st the versions I use on Debian wheezy

ii  facter  1.6.11-1puppetlabs1all 
 Ruby module for collecting simple facts about a host operating system
ii  puppet 2.7.19-1puppetlabs2all   
   Centralized configuration management - agent startup and compatibility 
scripts
ii  puppet-common2.7.19-1puppetlabs2all 
 Centralized configuration management
ii  puppet-dashboard  1.2.10-1puppetlabs2all 
 Dashboard for Puppet
ii  puppetlabs-release 1.0-5  all   
   "Package to install Puppet Labs gpg key and apt repo"
ii  puppetmaster 2.7.19-1puppetlabs2all 
 Centralized configuration management - master startup and compatibility 
scripts
ii  puppetmaster-common2.7.19-1puppetlabs2all 
 Puppet master common scripts
ii  vim-puppet  2.7.19-1puppetlabs2all 
 syntax highlighting for puppet manifests in vim


info: Retrieving plugin
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
info: Loading facts in 
/etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb


When I look into /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb 
or /var/lib/puppet/lib/facter/facter_dot_d.rb

The Directory for the external facts should be in


/etc/facts.d


so I created it.


I also downloaded the latest stdlib and included it.
The fact is:

 /etc/facts.d/datacenter.yaml

 location: FRA


Now I do a puppet run. (pluginsync is enabled in the puppet.conf)
then
facter location -p -d
Not an EC2 host

if I run just facter it works with the standard facts

Thanks for any help! 

 

 

 

 

 

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/FhdwZQEXeTsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Don't touch non-default config files

2012-08-29 Thread Jones
Hi folks,

I'd like to say puppet. 
If the standart config file, delivered by dpkg, is changed and has also not 
the same md5sum as
the file I want to deliver with puppet. Do nothing :)

OK guys.. that was not my idea! I say everything has to be changed in 
puppet and not by hand.

Or Maybe there is a way to use facter for it?!

Thank's for your recommendations!

Jonesi

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/n2Gl5nwHdY8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: all classes applied to every node

2012-08-20 Thread Jones
Thanks! I had the same issue. Works out well.

node webserver01...12 inherits default {
class { "nagios::webserver":stage => post }
include apache::apache_security
include apache::php_security
include apache::apache_conf_webserver
}



Am Dienstag, 12. Juli 2011 17:06:53 UTC+2 schrieb Jacob Helwig:
>
> Zach > wrote:
>>
>> You guys got me on the right track...  Turns out I was running into
>> this:
>>
>> "One of THE MOST DIFFICULT concepts to understand for puppet newbies
>> is that these two things are identical:
>>
>> include foo
>> class { 'foo': }"
>>
>> In my case, I was declaring things like:
>> class { "nagios::webserver": stage => post }
>> at the very top of the site.pp
>>
>> Is there a better way to declare what stage a class belongs to within
>> the class declaration itself?
>>
>> Right now, I am doing something like this:
>>
>> node webserver01...12 inherits default {
>>  class { "nagios::webserver":stage => post }
>>  include apache::apache_security
>>  include apache::php_security
>>  include apache::apache_conf_webserver
>> }
>>
>> It's pretty ugly to have to keep declaring the stage in every node
>> group (I have webservers,
>> app servers, etc)
>>
>> On Jul 12, 9:21 am, jcbollinger  wrote:
>> > On Jul 11, 10:52 am, Zach  wrote:
>> >
>> > > Hi all,
>> >
>> > > I'm noticing that all classes I have created are being applied to
>> > > every node, even ones that don't specifically "include" them.  There
>> > > is no inheritance occurring that would allow this to happen.  I've
>> > > been reading docs and couldn't find anything about this...  Am I
>> > > missing something obvious?   Let me know if you need more info
>> >
>> > The problem is far more likely to be in your manifests than to be in
>> > Puppet, but without seeing the manifests we can only speculate.  My
>> > best guess is that you have top-level "include" statements in one or
>> > more of your manifests, perhaps where you meant "import" instead.  It
>> > may also be that some
>> of your classes are including others, with the
>> > result that all classes get pulled in even though some are not
>> > explicitly included at node level.
>> >
>> > John
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To post to this group, send email to puppet...@googlegroups.com 
>> .
>> To unsubscribe from this group, send email to 
>> puppet-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
> You should be able to set the default stage just like any other parameter. 
> Jesse and I fixed that a while back. Forget which version it's fixed in 
> though.
> -- 
> Sent from my phone. Please excuse my brevity.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JH1tEQde668J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Example42 MySQL puppet-module

2012-02-21 Thread Thomas Jones
mysql::grant { ["db1", "db2"]: mysql_privileges => "ALL", mysql_password =>
"password", mysql_db => "db1", mysql_user => ["db1", "db2"], mysql_host =>
"%" } }

Keep in mind this sets both users with same pw for both dbs. It would be
better to just copy n paste another grant directive and chg according to
another user.
On Feb 9, 2012 8:09 PM, "Will S. G."  wrote:

> Hi there,
>
> I thought I understood how this module works, but I guess I missed
> something. Here is what I have in my nodes.pp
>
>
> node 'mysql' inherits default {
>include mysql
>mysql::user { "db1":
>mysql_password_hash => "db1",
>mysql_user => "db1",
>mysql_host => "%"
>}
>mysql::grant { "db1":
>mysql_privileges => "ALL",
>mysql_password => "password",
>mysql_db => "db1",
>mysql_user => "db1",
>mysql_host => "%"
>}
> }
>
> That works perfectly. What I want to do is expand this to be able to
> setup additional users and grants. I thought adding more lines for
> mysql::user & mysql::grant to do more users.
>
> Any suggestions how I do this? I'm at a bit of a loss how to handle
> multiple users and grants.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet SSL Problems

2012-02-03 Thread Thomas Jones
I am attempting to implement puppet for a server block of 20. Have set
it up and used for 2 months now. All of a sudden i get SSL problems.
Here is what ive done:

Server - removed Server SSL directory completely(/var/lib/puppetmaster/ssl).
Server(Client) - removed Client SSL directory completely(/var/lib/puppet/ssl).
Client - removed SSL directory completely(/var/lib/puppet/ssl).

I have restarted puppetmaster. Verified its status.

*snip*
[root@puppet-server thomasjones]# /usr/sbin/puppetca --clean --all
[root@puppet-server thomasjones]# /sbin/service puppetmaster start
Starting puppetmaster: [  OK  ]
[root@puppet-server thomasjones]# /sbin/service puppetmaster status
puppetmasterd (pid  19464) is running...
*end snip*

On the external client i have issued

/usr/sbin/puppetd --server puppet-server.domain.com --verbose
--no-daemonize --waitforcert 60

I receive:
*snip*
err: Could not request certificate: Retrieved certificate does not
match private key; please remove certificate from server and
regenerate it with the current key
*end snip*

I check the puppetca:

*snip*
[root@puppet-server thomasjones]# /usr/sbin/puppetca --list --all
+ puppet-server.hitcents.com (D4:CE:87:80:3B:12:8B:94:48:B4:58:04:B6:F8:6D:68)
*end snip*

I would gladly do that if a key existed and i could sign a new one!!! ugh.

Versions are:

[thomasjones@webserver htdocs]$ rpm -qi puppet
Name: puppet   Relocations: (not relocatable)
Version : 2.7.5 Vendor: Dag Apt
Repository, http://dag.wieers.com/apt/
Release : 1.el5.rf  Build Date: Sun 16 Oct
2011 12:38:48 PM CDT
[root@puppet-server thomasjones]# rpm -qi puppet-server
Name: puppet-serverRelocations: (not relocatable)
Version : 2.7.5 Vendor: Dag Apt
Repository, http://dag.wieers.com/apt/
Release : 1.el5.rf  Build Date: Sun 16 Oct
2011 12:38:48 PM CDT

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Sensible, Manageable, CentOS puppetmaster?

2011-02-16 Thread Howard Jones
I've been going round in circles a little bit in the last few days
trying to figure out how to get a 64-bit CentOS-based puppetmaster
that can be managed/provisioned via puppet also - so I'd like ruby,
passenger, rails etc coming from RPMs and yum. As far as I can see,
the three choices are:
1) Puppetlabs prosvc repo, which specifically says it can go away at any time
2) Premiumhelp repo - 32-bit only
3) My own local repo (although I couldn't find working src.rpm/spec
files for ruby, and I'm by no means a ruby expert)

What does everyone else do? It seems weird that the tool intended to
manage everything else is so hard to manage itself (package-wise), so
I'm assuming I've missed something obvious... obviously there is a
choice 4 - just build it all from source - but that feels dirty,
especially on the puppet server!

Thanks in advance for any illumination,

Howie

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] "Registering" a node with a central service?

2011-01-26 Thread Howard Jones
I have a couple of applications (backup, Cacti, Asset Tracking) where I want
a node to have some package and config installed, and once that is done,
some config to be done on another system to register the client with a
central server. Is there a standard way to do this, short of having some
kind of web service accessible from all the client systems? From my limited
Puppet knowledge, anything I add into the manifest for a node runs on that
node, doesn't it?

Thanks in advance for any pointers,

Howie

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.