[Puppet Users] Re: Puppet Master as agent to itself continues to generate SSL errors

2021-09-12 Thread Nathan Abbott
Hi Puppet users group,

First time poster here.

This issue matches what I'm facing exactly, although in my circumstance we 
are not intentionally trying to do the  " the master is also an agent 
pointing to itself  " thing.
We are in this situation because someone ran 'puppet ssl clean' and 'puppet 
agent -t' accidently on the master itself. (as opposed to the client where 
they were supposed to run it.)

Were you able to resolve this issue? i expect that we will have to 
regenerate a master cert and re-sign all client certs also? or is there a 
more simple/quicker solution that anyone can think of?

Thanks in advance

-Nathan

On Saturday, June 20, 2015 at 12:31:37 AM UTC+9:30 jeff...@gmail.com wrote:

> I've been battling this issue all week with a new puppet (open source) 
> build out. I stood up the puppet master and configured it. I have a test 
> agent that works correctly (external to the master). However, the master is 
> also an agent pointing to itself. In this instance, ep1p-apux06 is the 
> puppet master. I generated the cert using the hostname 'puppet.domain.com' 
> to try to prevent accidental deletion of the puppet master cert when 
> running 'puppet cert clean --all'.
>
> I can run 'puppet agent -t' on the master and it runs without error. But 
> 30 minutes in, and these errors show up in the log files, even though if I 
> rerun the puppet agent, it comes back without errors.
>
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: Unable to fetch my node 
> definition, but the agent run will continue:*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: The certificate 
> retrieved from the master does not match the agent's private key.*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: Certificate fingerprint: 
> A9:1C:29:E2:66:65:46:EB:C8:37:C7:27:24:85:9C:58:2D:24:19:C4:2C:53:7B:46:D4:D5:65:93:57:CF:52:11*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: To fix this, remove the 
> certificate from both the master and the agent and then start a puppet run, 
> which will automatically regenerate a certficate.*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: On the master:*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]:   puppet cert clean 
> ep1p-apux06.domain.com <http://ep1p-apux06.domain.com>*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: On the agent:*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]:   1a. On most platforms: 
> find /etc/puppet/ssl -name ep1p-apux06.domain.com.pem -delete*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]:   1b. On Windows: del 
> "/etc/puppet/ssl/ep1p-apux06.domain.com.pem" /f*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]:   2. puppet agent -t*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: 
> (/File[/var/lib/puppet/facts.d]) Failed to generate additional resources 
> using 'eval_generate': SSL_CTX_use_PrivateKey:: key values mismatch*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: 
> (/File[/var/lib/puppet/facts.d]) Could not evaluate: Could not retrieve 
> file metadata for puppet://puppet/pluginfacts: SSL_CTX_use_PrivateKey:: key 
> values mismatch*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: 
> (/File[/var/lib/puppet/lib]) Failed to generate additional resources using 
> 'eval_generate': SSL_CTX_use_PrivateKey:: key values mismatch*
> *Jun 19 08:39:43 ep1p-apux06 puppet-agent[20602]: 
> (/File[/var/lib/puppet/lib]) Could not evaluate: Could not retrieve file 
> metadata for puppet://puppet/plugins: SSL_CTX_use_PrivateKey:: key values 
> mismatch*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: Could not retrieve 
> catalog from remote server: SSL_CTX_use_PrivateKey:: key values mismatch*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: Using cached catalog*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: 
> (/Stage[main]/Ntp::Config/File[ntp.conf]) Could not evaluate: Could not 
> retrieve file metadata for puppet:///modules/ntp/ntp.conf: 
> SSL_CTX_use_PrivateKey:: key values mismatch*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: 
> (/Stage[main]/Ntp::Service/Service[ntpd]) Dependency File[ntp.conf] has 
> failures: true*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: 
> (/Stage[main]/Ntp::Service/Service[ntpd]) Skipping because of failed 
> dependencies*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: Finished catalog run in 
> 0.03 seconds*
> *Jun 19 08:39:44 ep1p-apux06 puppet-agent[20602]: Could not send report: 
> SSL_CTX_use_PrivateKey:: key values mismatch*
>
> I can run the agent test on itself and it comes back without error:
> *[root@ep1p-apux06 puppet]# puppet agent -t*
> *Info: Retrieving pluginfacts*
> *Info: Retrieving plugin*
> *Info: Caching catalog for ep1p-apux06.domain.com 
> <http://ep1p-apux06.domain.com>*
> *Inf

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.


[Puppet Users] Re: issue creating symlink

2016-05-09 Thread Nathan Crews
Worked Perfectly, Thank you

On Monday, May 9, 2016 at 3:03:38 AM UTC-6, Peter Faller wrote:
>
> Maybe all you need is:
>
> file { 'docroot':
>   path  => '/var/www/html',
>   ensure=> link,
>   force => true,
>   target=> '/vagrant/public',
> }
>
>

-- 
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/6c34e8ad-f398-4d32-abc4-c01333c568f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] issue creating symlink

2016-05-06 Thread Nathan Crews
Currently i'm using Vagrant and bash scripts to provision a local dev 
environment. I'm working on moving this to Puppet and running into an issue 
with creating a symlink to my apache document root that I cant seem to sort 
out.

These are the commands in the bash script i'm trying replace/replicate

sudo rm -rf /var/www/html
sudo ln -s /vagrant/public /var/www/html



in my puppet manifest I have the following 

file{ 'docroot':
 path => '/var/www/html',
 ensure => absent,
 purge => true,
 recurse => true,
 force => true,
}


file{ '/vagrant/public':
 ensure => link,
 force => true,
 target => '/var/www/html',
 require => File['docroot'],
}





The output when the manifist runs is 
==> default: Debug: /Stage[main]/Main/File[docroot]: Removing existing 
directory for replacement with absent
==> default: Notice: /Stage[main]/Main/File[docroot]/ensure: removed
==> default: Debug: /Stage[main]/Main/File[docroot]: The container docroot 
will propagate my refresh event
==> default: Debug: /Stage[main]/Main/File[/var/www/html/index.html]: 
Nothing to manage: no ensure and the resource doesn't exist
==> default: Debug: docroot: The container Class[Main] will propagate my 
refresh event
==> default: Info: /Stage[main]/Main/File[/vagrant/public]: Recursively 
backing up to filebucket
==> default: Debug: /Stage[main]/Main/File[/vagrant/public]: Removing 
existing directory for replacement with link
==> default: Info: /Stage[main]/Main/File[/vagrant/public]: Recursively 
backing up to filebucket
==> default: Debug: /Stage[main]/Main/File[/vagrant/public]: Removing 
existing directory for replacement with /var/www/html
==> default: Error: Could not remove existing file
==> default: Error: /Stage[main]/Main/File[/vagrant/public]/ensure: change 
from directory to link failed: Could not remove existing file


Which seems to indicate it couldn't remove a file... /var/www/html did have 
an index.html file in it. With Purge => true and ensure => absent the 
index.html and the html folder its self are both gone as expected.  Yet I 
still get the could not remove existing file message while trying to create 
the link.  

I have tried setting ensure=> directory in File[ 'docroot' ] to leave an 
empty html directory and still get the same error.  So clearly i'm doing 
something wrong...  any help would be apprichated.  Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a6dff8d7-9705-4a5f-8489-1528134c4319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Enterprise Installation errors

2015-12-22 Thread nathan joiner
Thanks guys for the suggestions!

My company (NCL) is in charge of purchasing so they haven't upgraded to a 
newer version on their end. That's why I'm stuck with this version.

I also validated the following:

- ensure proper DNS functionality (or specify host/ip in /etc/hosts) 
  - set to localhost
- ensure proper local time (ntp) 
  - this is correct
- /tmp needs to be mounted with exec option 
  - /tmp has the exec access (drwxrwxrwt.  3 rootroot 4096 22. Dez 
19:10 tmp)

- local firewall enabled 
  - This is enabled
- selinux restrictions enabled 
  - selinux is set to permissive

Any other ideas?

On Tuesday, December 22, 2015 at 1:22:49 PM UTC-5, Martin Alfke wrote:
>
> Hi Nathan, 
>
> On 22 Dec 2015, at 18:54, Lindsey Smith <l.s...@puppetlabs.com 
> > wrote: 
>
> > 
> > 
> > On Tue, Dec 22, 2015 at 9:36 AM, nathan joiner <determ...@gmail.com 
> > wrote: 
> > Good Morning, 
> > 
> > I'm trying to setup PE puppet master server and a windows agent node but 
> I'm getting "no authorization" when trying to run the 
> puppet-enterprise-installer. 
> > 
> > Environment: 
> > - I'm using a windows 7 machine 
> > - Using Cmder to add and ssh into a CentOS server that will be used as 
> the Puppetmaster server. 
> > 
> > I've done the following: 
> > - SCPed PE 3.7.2 directory onto the root folder of my CentOS vm 
> > 
> > Any specific reason to use PE 3.7.2? I'd strongly recommend the most 
> recent version of PE 3.8, if not the latest PE 2015.3 with Puppet 4. If 
> you're just starting with Puppet, starting there may be better. 
>
> Good comment from Lindsey: when you start with Puppet you should go for 
> the newest PE version available. 
> Make use of elder versions in case of specific requirement only. 
>
> >   
> > - Running as super user (su) 
> > - CDed into puppet enterprise directory 
> > - Ran ./puppet-enterprise-installer -s answers.txt 
> > - Recieved a not authorized error message. 
>
> Check the following: 
>
> - ensure proper DNS functionality (or specify host/ip in /etc/hosts) 
> - ensure proper local time (ntp) 
> - /tmp needs to be mounted with exec option 
>
> More unlikely: 
> - local firewall enabled 
> - selinux restrictions enabled 
>
> hth, 
> best, 
> Martin 
>
>
> > 
> > Thanks! 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/8d859d0f-d23d-407e-8963-00d3be60da14%40googlegroups.com.
>  
>
> > 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/CAPyei8WAohMawXAx%3D7r07L33Z9XQ9CydBGwth-4jYE9YOyi3hA%40mail.gmail.com.
>  
>
> > 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/9e75f90b-6663-42ce-a3f7-8b65f33c5b63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Enterprise Installation errors

2015-12-22 Thread nathan joiner
Good Morning,

I'm trying to setup PE puppet master server and a windows agent node but 
I'm getting "no authorization" when trying to run the 
puppet-enterprise-installer.

Environment:
- I'm using a windows 7 machine
- Using Cmder to add and ssh into a CentOS server that will be used as the 
Puppetmaster server.

I've done the following:
- SCPed PE 3.7.2 directory onto the root folder of my CentOS vm 
- Running as super user (su)
- CDed into puppet enterprise directory
- Ran ./puppet-enterprise-installer -s answers.txt
- Recieved a not authorized error message.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8d859d0f-d23d-407e-8963-00d3be60da14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Nathan Earixson
Hi, I think I'm misunderstanding either Hiera data bindings or the hash 
merge functions, but I'm not sure which.

When I override a Hiera setting in a more specific level of the heriarchy, 
only that setting gets applied. In fact, settings from more general levels 
get removed.

Example:
I'm using the saz-ssh module to set SSH server options.

Testing with a simple Hierarchy like so:
- %{::osfamily}
  - %{::kernel}
  - common


Linux.yaml:
ssh::server_options:
  TCPKeepAlive: 'yes'
  ClientAliveInterval: 540
  PermitRootLogin: 'no'


RedHat.yaml
ssh::server_options:
  TCPKeepAlive: 'yes'
  ClientAliveInterval: 540
  PermitRootLogin: 'yes'



Gives me the expected sshd_config:
# File is managed by Puppet

AcceptEnv LANG LC_*
ChallengeResponseAuthentication no
ClientAliveInterval 540
PermitRootLogin yes
PrintMotd no
Subsystem sftp /usr/libexec/openssh/sftp-server
TCPKeepAlive yes
UsePAM yes
X11Forwarding yes



If I change the RedHat.yaml to include ONLY the setting I want to override 
(Linux.yaml is unchanged):
ssh::server_options:
  PermitRootLogin: 'yes'



After puppet agent runs, sshd_config is missing the other two settings 
(ClientAliveInterval and TCPKeepAlive) settings:
AcceptEnv LANG LC_*
ChallengeResponseAuthentication no
PermitRootLogin yes
PrintMotd no
Subsystem sftp /usr/libexec/openssh/sftp-server
UsePAM yes
X11Forwarding yes




Hiera lookups from the command line work as I expect them to, returning a 
has of all three settings with the overridden one correct:

 sudo -u puppet hiera --hash ssh::server_options environment=test 
::kernel=Linux ::osfamily=RedHat
 
{PermitRootLogin=yes, TCPKeepAlive=yes, 
ClientAliveInterval=540}


sudo -u puppet hiera --hash ssh::server_options environment=test 
::kernel=Linux
{PermitRootLogin=no, ClientAliveInterval=540, TCPKeepAlive=yes}


I have tried this with AND without :merge_behavior: deeper set in the 
hiera.yaml file.

Any ideas of what I am missing?

-- 
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/05da44a4-7fb6-454b-b769-942fb023d095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Nathan Earixson
Thank you. I get it now.

-n

On Monday, December 8, 2014 3:13:26 PM UTC-6, Ramin K wrote:

 On 12/8/14 12:56 PM, Nathan Earixson wrote: 
  sudo -u puppet hiera --hash ssh::server_options environment=test 
  ::kernel=Linux 
  {PermitRootLogin=no, ClientAliveInterval=540, 
 TCPKeepAlive=yes} 
  
  | 
  
  I have tried this with AND without :merge_behavior: deeper set in the 
  hiera.yaml file. 
  
  Any ideas of what I am missing? 

 If you're using data bindings to lookup the hiera values, it will return 
 a matching hash, but will not merge. You must explicitly use a 
 hiera_hash call to get merging. 

 Ramin 


-- 
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/b1371998-455e-4fdf-9e5d-c712a66a5fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Cisco: No error, but no Applying

2014-08-25 Thread Nathan Brito
sorry, I posted missing content. 
I had already specified node. 
Follow the correct manifest: 

node switch.mydomain {
interface {
   GigabitEthernet1/0/1:
description = teste,
}
 }


yet the problem continues.

Em sexta-feira, 22 de agosto de 2014 17h36min33s UTC-3, Nan Liu escreveu:

 On Fri, Aug 22, 2014 at 12:10 PM, Nathan Brito natha...@gmail.com 
 javascript: wrote:

 I'm trying to apply settings on a Cisco Catalyst 2960S through the 
 puppet, but I can not. 

 When I give the device #puppet verbose command, the puppet does not 
 return me error but does not apply the manifest. 


 *Follows the return of the command:*

 #puppet device --verbose
 Info: starting applying configuration to switch.mydomain at 
 telnet://admin:admin@switch.mydomain
 Info: Retrieving pluginfacts
 Info: Retrieving plugin
 Info: Caching catalog for switch.mydomain
 Info: Applying configuration version '1408732346'
 Notice: Finished catalog run in 0.05 seconds



 */etc/puppet/puppet.conf:*

 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/var/lib/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 #templatedir=$confdir/templates
 [master]
 # These are needed when the puppetmaster is run by passenger
 # and can safely be removed if webrick is used.
 ssl_client_header = SSL_CLIENT_S_DN
 ssl_client_verify_header = SSL_CLIENT_VERIFY
 dns_alt_names = puppetmaster,puppetmaster.mydomain


 */etc/puppet/device.conf*

 [switch.mydomain]
 type cisco
 url telnet://admin:admin@switch.mydomain


  
 *Manifest: /etc/puppet/manifests/switch.pp*
  

 interface {
   GigabitEthernet0/1:
 description = puppet test,
 }
 }



 I think this needs to be under a node that matches your device.conf 
 setting, so site.pp:

 node switch.mydomain {
   interface { ...
   }
 } 

 HTH,

 Nan


-- 
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/5363ef17-90ee-46f0-aec1-bee39e00556a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Cisco: No error, but no Applying

2014-08-22 Thread Nathan Brito
I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet, 
but I can not. 

When I give the device #puppet verbose command, the puppet does not 
return me error but does not apply the manifest. 


*Follows the return of the command:*

#puppet device --verbose
 Info: starting applying configuration to switch.mydomain at 
 telnet://admin:admin@switch.mydomain
 Info: Retrieving pluginfacts
 Info: Retrieving plugin
 Info: Caching catalog for switch.mydomain
 Info: Applying configuration version '1408732346'
 Notice: Finished catalog run in 0.05 seconds



*/etc/puppet/puppet.conf:*

[main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/var/lib/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 #templatedir=$confdir/templates
 [master]
 # These are needed when the puppetmaster is run by passenger
 # and can safely be removed if webrick is used.
 ssl_client_header = SSL_CLIENT_S_DN
 ssl_client_verify_header = SSL_CLIENT_VERIFY
 dns_alt_names = puppetmaster,puppetmaster.mydomain


*/etc/puppet/device.conf*

[switch.mydomain]
 type cisco
 url telnet://admin:admin@switch.mydomain


 
*Manifest: /etc/puppet/manifests/switch.pp*
 

 interface {
   GigabitEthernet0/1:
 description = puppet test,
 }
 }


*PS: after that I see that nothing has changed on the switch*

-- 
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/d366038c-1062-4e1c-b21f-2bb7cbacc2ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] On code organization and the deprecation of include

2014-05-21 Thread Andre Nathan
Hello

I have a fairly large repository (~100 modules, ~50 classes, ~200 nodes). 
It is currently organized like this:

modules/
apache2/
  manifests/
  files/
  templates/
iptables/
  manifests/
  files/
  templates/
postfix/
  manifests/
  files/
  templates/
...
manifests/
classes/
webserver.pp
webserver/
apache2.pp
iptables.pp
mta/
postfix.pp
iptables.pp
...
nodes/
webserver.pp
webserver/
web1.pp
web2.pp
...
mta.pp
mta/
mta1.pp
mta2.pp
...

Subclasses in the modules directory are found via the autoloader, and as 
long as I follow the file naming conventions, that works fine. For classes 
and nodes, I have to use import. For example, in classes/webserver.pp I 
have import webserver/*.pp so that I can access classes 
webserver::apache2, webserver::iptables and so on. The same is done for 
nodes. I usually have a generic node where I set variables that are 
common for that class of nodes, and then the nodes themselves which inherit 
the generic node and set their own variables. To make that work, I use 
import in the same way as described above.

I understand that with the deprecation of include, this will not work 
anymore. I can work around this for my classes by adding a new directory to 
the modulepath and then converting the directory structure to the 
manifests/files/templates structure with an init.pp file. However, what can 
I do about the nodes? The new feature of setting the manifest to a 
directory does not support subdirectories. Will I be forced to have all my 
nodes in the same directory and then rely on file names for organization? 
This is far from optimal in my opinion. What other alternatives do I have? 
If at all possible, I'd like to avoid using ENCs and keep using puppet 
files for node definitions.

Thanks in advance,
Andre

-- 
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/7eabce0e-edf6-488a-8182-41ba41e09f0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] On code organization and the deprecation of include

2014-05-21 Thread Andre Nathan
On Wednesday, May 21, 2014 1:14:31 PM UTC-3, Garrett Honeycutt wrote:

 I believe you mean the deprecation of 'import'.


Woops, indeed.
 

 The easiest way to fix 
 this is to cat all of your files together into one site.pp file. 


Now that's even worse than having all node files in a single directory.
 

 Your usage of a base node that other nodes inherit is an anti-pattern 
 though and will cause you grief as you grow.


Why is it an anti-pattern? Isn't variable inheritance supported? Why can't 
I organize my nodes in sub-directories? It's something simple that greatly 
enhances code organization.

Best,
Andre

-- 
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/3be8fcd1-0626-4947-bf2b-d9d63475f470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] On code organization and the deprecation of include

2014-05-21 Thread Andre Nathan
On Wednesday, May 21, 2014 1:59:09 PM UTC-3, Doug_F wrote:

 I organize my setup so that hiera looks for my nodes under 
 hieradata/nodes/certname.yaml I see no reason not to allow further nesting 
 if needed. 


It may be the only solution for me, but I'd rather not use YAML files as 
the risk of someone doing an edit and messing up with the indentation is 
high.

That being said it may be a good time to look into an ENC (External Node 
 Classifier) like Foreman. I haven't done this yet as I work on a team and 
 have to take baby steps so everyone keeps up. 


This would remove the nodes from version control, which I'd rather not do 
either...

Thanks,
Andre

-- 
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/a0e9c129-5867-4931-95e1-653a5d8c8835%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread Nathan Valentine
Hiera allows multiple backends, YAML being one and also being the one
with which most people start, some of which can be non-static. If you
Google for Craig Dunn's blog you'll see an example where he uses a
backend which enables Hiera data retrieval from a CouchDB backend.
That particular example is one of my favorites examples of the
flexibility of Hiera.

As to how to get CF data into Puppet, I've not used CF enough to
venture a solid guess but the first thing I would do is look to see if
someone has a Forge module which presents user data as facter
variables. In the case of AWS/EC2 facts this is done, if memory
serves, via a Type and Provider that queries the 169.x node metadata
service embedded in AWS/EC2.

Feel free to let me know how that goes via direct email. I rarely have
time to keep up with the mailing list.

Cheers.



On Tue, Apr 1, 2014 at 1:09 PM,  linuxhpc...@gmail.com wrote:
   Hello all, thanx in advance for listening to my sniffles as I am failing
 at solving this problem.

   I have CloudFormation template that builds out some servers.  I have
 parameterized a few values like. DatabseName DataBaseUser DataBaseLocation
 and some others.  The problem I seem to be faced with is getting these
 values to puppet to perform the correct configuration steps.  I had a pretty
 good idea about how I could accomplish this, and then someone introduced
 .yaml files as part of hiera..  While I am not that impressed with hiera, it
 seems to introduce a-lot of static environment files to manage.  This is not
 a road our team wants to travel down.  If I am wrong about this I am
 certainly open to enlightenment, but from what I have read and witnessed,
 it's static.

  So here I am, I have this CF template that asks for parameters that I need
 puppet to use for configuration.  Does anyone have any suggestions as I read
 on through all this documentation?


  Thanks,

 J

 --
 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/7d2b3b5a-87b5-4078-bff1-ab3e0ed49388%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
---
Nathan Valentine, Puppet Labs Professional Services

Join us at PuppetConf 2014, September 23-24 in San Francisco -
http://puppetconf.com

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BsYer22UaQ%2B%2BxYcsm%3DrQkaZHRuSaK9jZrs1ytPadTqQKWXB1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread Nathan Valentine
 variables. In the case of AWS/EC2 facts this is done, if memory
 serves, via a Type and Provider that queries the 169.x node metadata
 service embedded in AWS/EC2.

Sorry, perils of multitasking... s/Type and Provider that/series of
custom facts which/g.

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


Re: [Puppet Users] Puppet certification PPT-202

2014-04-01 Thread Nathan Valentine
http://puppetlabs.com/services/certification has a pretty solid list
of pre-cert study materials but, yes, the more hands-on experience you
have with Puppet/PE the better.

Of the self-study resources mentioned there, I highly recommend:

1) The Puppet Certification Practice Test
2) The Puppet Learning Management System videos
3) The Puppet Enterprise Learning VM

The training course are also awesome but then I'm biased as I'm a trainer. ;)

Also be aware that the content for the cert test was recently
refreshed. In my opinion, and I was among the people who worked on the
new version of the test, the new version is more challenging than the
old test. I would trust the Practice Test as a gauge over the word of
anyone who might have taken the previous version of the cert.

Good luck! If you pass don't post that fact to LinkedIn until you've
upped your mobile plan as the recruiters will set your phone on fire!
;)

-- 
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/CA%2BsYer3OtF1ORQNAAw3-3fy4bU6%3D-c5Cu0XR_n46k4MQo3EzWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Hash iteration order in a template not consistent

2014-02-24 Thread Andre Nathan
On Friday, February 21, 2014 10:15:01 AM UTC-3, Andre Nathan wrote:

 On Thursday, February 20, 2014 12:06:15 PM UTC-3, jcbollinger wrote:

 File a ticket if you wish, but personally, I'm inclined to say that 
 *any*reliance on iteration order of a hash is dodgy. If iteration order 
 matters 
 then you need to take proactive measures to ensure that you reliably get 
 the (an) order that works for you.


 Well, it's not a case of order being important. I don't care about the 
 order, but it should always be the same. Otherwise, when you build a 
 configuration file from a template, that file gets changed every time 
 Puppet runs, because the directives are reordered.


I createt ticket PUP-1755 on the tracker.

Cheers,
Andre

-- 
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/21e0759a-811f-411b-91f5-aa5766bec9a2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Hash iteration order in a template not consistent

2014-02-21 Thread Andre Nathan
On Thursday, February 20, 2014 12:06:15 PM UTC-3, jcbollinger wrote:

 File a ticket if you wish, but personally, I'm inclined to say that 
 *any*reliance on iteration order of a hash is dodgy. If iteration order 
 matters 
 then you need to take proactive measures to ensure that you reliably get 
 the (an) order that works for you.


Well, it's not a case of order being important. I don't care about the 
order, but it should always be the same. Otherwise, when you build a 
configuration file from a template, that file gets changed every time 
Puppet runs, because the directives are reordered.

Thanks,
Andre

-- 
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/11e3d5d2-9e98-472a-9ae5-cfb8b7d7a9d7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Hash iteration order in a template not consistent

2014-02-19 Thread Andre Nathan
Hello

Sorry to ressurect this old thread, but I've just found this issue 
upgrading from Puppet 2.7.x to Puppet 3. It's true that ruby 1.8 hash order 
cannot be relied on, but it should always be the same, right? I mean, one 
doesn't know which order the hash contents will be iterated on, but 
whatever order ruby chooses should never change.

We had this working with no issues in 2.7.x and ruby 1.8, but now on Puppet 
3 we're getting random reorderings. I suspect there's a problem in Puppet 
in this case.

Best,
Andre

On Wednesday, March 28, 2012 9:39:45 AM UTC-3, R.I. Pienaar wrote:

 - Original Message -
  From: Martijn Grendelman mar...@iphion.nl javascript:

 snip

  
 http://serverfault.com/questions/368784/puppet-and-templates-how-to-loop-sequently-and-not-randomly
  
  which suggests to do something like
  
  % aliases.sort_by {|key, value| key}.each_pair do |key, val| -%
  % end -%
  
  Will it work? Is that a proper solution?

 ruby hashes are not stored in predictable order so this will happen, the 
 proposed
 solution should work.

 But as always the best is just to test it and see how it goes, it wont 
 bite :)



-- 
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/068cf600-4f30-41d9-8249-30e6cec096fd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Thoughts on roles/profiles class paradigm

2014-01-22 Thread Nathan Nobbe
On Wednesday, January 9, 2013 2:34:30 PM UTC-7, Wolf Noble wrote:

 Hi Gang, 

 My colleagues and I are contemplating refactoring our modules to take 
 advantage of the roles/profiles paradigm suggested by Craig Dunn in his 
 blog post found here: 
 http://www.craigdunn.org/2012/05/239/ 

 Before we jump feet-first into adopting this paradigm, I thought it a good 
 idea to reach out and see what everyone else thinks about this. 

 We're currently struggling with some problems that this paradigm seems to 
 solve quite nicely; but I'm not convinced it's the best abstraction / 
 organization paradigm out there. 

 If you've not read it, I think It's worth the few minutes it takes to 
 read.  Thanks Craig, for writing it. 




  

 This message may contain confidential or privileged information. If you 
 are not the intended recipient, please advise us immediately and delete 
 this message. See http://www.datapipe.com/legal/email_disclaimer/ for 
 further information on confidentiality and the risks of non-secure 
 electronic communication. If you cannot access these links, please notify 
 us by reply message and we will send the contents to you. 


I read Craig's article numerous times and have recently published an 
articlehttp://quickshiftin.com/blog/2014/01/composition-in-puppet/on my 
thoughts. To summarize, I feel the big lesson from the article is 
composition is needed to define reusable grouped module declarations (aka 
*roles*). Whether or not you like the notion of the 2-layered approach 
(roles *and* profiles) is something else and a bit extra IMO.

That said I'm only managing tens of servers rather than hundreds or 
thousands so far, but for me one layer to represent 'roles' has worked 
great.

What it amounts to for me is a simple guideline - leverage inheritance (or 
the hiera hierarchy) as much as possible and introduce composition on a 
need-to basis. Composition is necessary though, unless all your systems are 
identical.

Thanks again Craig for the article. Neat to find you on the google group!

-nathan

-- 
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/c2c138f4-a703-43c9-8110-0522697063bc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Installed pupet , node_aws not showing up

2014-01-20 Thread Nathan Paul


Hi All,

Newbie Starting with Puppet on ubuntu

Installed puppet, puppetlabs/cloud_provisioner, gems guid and fog

Puppet help not showing node_Aws command. What else i need to install

Thanks in advance.

NP

-- 
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/d17faf34-d792-49aa-bed2-3b0c67e569bf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet open source node_aws

2014-01-20 Thread Nathan Paul
Hi All,

I am just starting to setup Puppet on Ubuntu. Puppet node_aws commnad is 
not seen when I run puppet. Do I need to install any other packages, If I 
need to run puppet with AWS ec2.

Thanks in advance for the help,

NP

-- 
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/f3b94a48-5033-45db-891a-f0cdfeaeee31%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread Nathan Valentine
Hey, David.

I'm a trainer for Puppet Labs and just finished teaching my bazillionth
Fundamentals class yesterday. ;)

The class is appropriate for those with at least a little bit of Ops or Dev
experience and it helps greatly if you are at least minimally comfortable
with VMWare/Virtualbox and things like SSH and Unix-y text editors (vi or
nano). That said of my my most impressive students was an MBA and had been
out of pure tech for 5 or 6 years. The classes assume no previous Puppet
experience but scripting experience certainly won't hurt you.

The class covers Puppet agent + master workflow, some basic version
control, Puppet modules, Defines, Parameterized Classes, Hiera and a few
other bits specific to Puppet Enterprise. I've had students who have been
doing Puppet for a couple of years come to the Fundamentals class and say
afterwards they were surprised how much they learned. One particular
student who expressed that view was maintaining a Puppet codebase of nearly
10k lines and thought he had seen it all before coming to class.

I will warn you that most people how decide to skip Fundamentals and go
straight to Advanced often regret it. It is quite a step up.

You might want to check the training schedule on our site. I think we list
Puppet Introduction classes there. They are a one-day very accelerated
and stripped down version of the Fundamentals class. They are almost always
taught at industry conferences as opposed to a public training center.
Sitting through one of those would give you a very good idea what to expect
in Fundamentals.

Feel free to email my offlist if you have other questions.






On Fri, Jan 17, 2014 at 9:35 AM, David Taylor david.a.tay...@gmail.comwrote:

 Hi all,

 I've been playing around with Puppet with a view to implementing it at my
 workplace. I've already run through the Learning Puppet tutorial on
 docs.puppetlabs.com and the quizzes in the Puppet Learn Library, and now
 I'm looking into more formal training to try and get everything nailed down
 in my head and to get an idea of best practices for module design,
 environments etc. I was wondering if anyone could advise on whether the
 Puppet Fundamentals course is the right course to go for, or is it aimed at
 the complete Puppet novice - i.e. will I find that it just retreads things
 I already know?

 Thanks,

 --
 Dave Taylor

 --
 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/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer1%2B9Q0KcS9LK_ETYh9RRrD1hG%3Db4NLSPg25jHbZyEC1sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] The Future - ENCs vs Hiera?

2014-01-08 Thread Nathan Valentine
Keep in mind that Hiera can support multiple backends and not all of them
mean manipulating JSON or YAML. For instance, I'm a proponent of something
like this:


On Sat, Jan 4, 2014 at 10:15 AM, Jose Luis Ledesma 
joseluis.lede...@gmail.com wrote:

 I'm in the process of setting up puppet in my company and I don't like at
 all the idea of having some thousand of files for describe the nodes. And,
 despite the well known limitations, I like a lot the idea of having an enc
 like ldap.

 Regards,

 --
 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/cbae58f9-3e14-472e-906d-ce7a3be355af%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer2ur0DoMdOa9K5VMG4SYn_goz3LjLocvTK_GsjyukY5dA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] The Future - ENCs vs Hiera?

2014-01-08 Thread Nathan Valentine
Sorry, bitten by the Gmail interface on that last one...

I'm a proponent of something like this:

http://www.craigdunn.org/2012/11/puppet-data-from-couchdb-using-hiera-http/

with classification data that doesn't change much ( 'require
::site::profile::base' ) perhaps living in YAML and specific one-off tweaks
to a node's config like perhaps an override of the default NTP server
coming from CouchDB. Much easier for the less Puppet-y people on a team to
login and twiddle things via CouchDB web interface.



On Wed, Jan 8, 2014 at 3:52 PM, Nathan Valentine nat...@puppetlabs.comwrote:

 Keep in mind that Hiera can support multiple backends and not all of them
 mean manipulating JSON or YAML. For instance, I'm a proponent of something
 like this:


 On Sat, Jan 4, 2014 at 10:15 AM, Jose Luis Ledesma 
 joseluis.lede...@gmail.com wrote:

 I'm in the process of setting up puppet in my company and I don't like at
 all the idea of having some thousand of files for describe the nodes. And,
 despite the well known limitations, I like a lot the idea of having an enc
 like ldap.

 Regards,

 --
 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/cbae58f9-3e14-472e-906d-ce7a3be355af%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




 --
 ---
 Nathan Valentine, Puppet Labs Professional Services
 Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?




-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer3urU3CM6RRWMQ6CCdhdbSFapX6H07ZsUtOO%2BHLdyTvFA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
You are making external facts too complicated. More like this:


 hello.rb
 ---
 #!/usr/bin/env ruby
 puts hello=Hello, World!


hello.yaml
---
---
hello='Hello, World!'


https://docs.puppetlabs.com/guides/custom_facts.html#external-facts


-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer3KWFMnc1W6BfLhoO23B-uapxCEKf5Gv98r5HbDq%2Bz%2BSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
sorry, s/=/:/g in hello.yaml

On Wed, Jan 8, 2014 at 4:40 PM, Nathan Valentine nat...@puppetlabs.com wrote:
 You are making external facts too complicated. More like this:


  hello.rb
  ---
  #!/usr/bin/env ruby
  puts hello=Hello, World!


 hello.yaml
 ---
 ---
 hello='Hello, World!'


 https://docs.puppetlabs.com/guides/custom_facts.html#external-facts


 --
 ---
 Nathan Valentine, Puppet Labs Professional Services
 Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?



-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer0yOMFcMWt0Fvr2swnphUp4VdvvXzYX3mGZ8CXQJKH6bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
The Facter.add scaffolding isn't required for external facts. That's
actually a key part of the design.

Here's an example vagrant environment with external facts similar to
your demo code:

https://github.com/nrvale0/vagrant-extfacts-demo

On Wed, Jan 8, 2014 at 5:03 PM, Shark Laser sharklaser1...@gmail.com wrote:
 The simpler ruby script you gave still exhibits the same behavior.  I'm sure
 the code in the facts I am using is correct, so I don't think it is a matter
 of their content.   As I mentioned I have literally copied examples from the
 tutorial and elsewhere.

 If I run facter --debug all of the facts give the same error message I give
 above that they were parsed but returned an empty dataset.

 If I run puppet agent --test then it is as if my fact did not exist.

 Any ideas?


 On Wednesday, January 8, 2014 4:40:10 PM UTC-8, Nathan Valentine wrote:

 You are making external facts too complicated. More like this:


  hello.rb
  ---
  #!/usr/bin/env ruby
  puts hello=Hello, World!


 hello.yaml
 ---
 ---
 hello='Hello, World!'


 https://docs.puppetlabs.com/guides/custom_facts.html#external-facts


 --
 ---
 Nathan Valentine, Puppet Labs Professional Services
 Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

 --
 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/faf70d9b-d15f-4f23-a058-f2ef79189636%40googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.



-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
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/CA%2BsYer24MG%2BBZu03R8rRutStLXit1gP%3Dwt611CJSJ%2BgOGV%2BOXA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: very odd Duplicate declaration problem.

2013-12-19 Thread Nathan Earixson
aha. this was it. I had:
package { bind:
 ensure = installed
}


OUTSIDE of the class site::dns_test { declaration. Thank you very much 
for the help.

-n


On Wednesday, December 18, 2013 8:52:57 AM UTC-6, jcbollinger wrote:



 On Tuesday, December 17, 2013 2:35:58 PM UTC-6, Nathan Earixson wrote:

 puppet 3.3.2 on RHEL6

 If I run puppet on a node:
 # sudo puppet agent --test --noop

 I get the following error:



 *Error: Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Duplicate declaration: Package[bind] is already declared in file 
 /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at 
 /etc/puppet/modules/site/manifests/dns.pp:4 on node 
 bushlnxadm01.chicagobooth.edu 
 http://bushlnxadm01.chicagobooth.eduWarning: Not using cache on failed 
 catalogError: Could not retrieve catalog; skipping run*


 That's weird. That node isn't a DNS server and shouldn't even be thinking 
 about running bind.

 If I open /etc/puppet/manifests/site.pp and save the file, the error goes 
 away on next puppet agent run.

 After about 15 minutes the node starts trying to apply the classes from 
 */etc/puppet/modules/site/manifests/dns_test.pp 
 *and after another 5 or so minutes I start getting the duplicate 
 declaration error again.

 If I save the manifest the puppet agent command works as expected for 
 another 15 minutes or so.



 I can't even begin to think of where to start looking on this. Any 
 thoughts would be appreciated.
 This seems to be happening on every node.



 Strange caching behavior sometimes results when you have declarations at 
 top level in a manifest other than site.pp or one directly or indirectly 
 'import'ed by site.pp.  For instance,

 module_path/my_module/manifests/init.pp:
 
 class my_module {
   # doesn't matter
 }

 # Oops:
 include dns_test

 # Also oops:
 Class['dns'] - Class['my_module']
 

 That sort of thing is very bad form because any declaration at top scope 
 (i.e. outside any class, node, or type definition) applies, in principle, 
 to all nodes, but manifests that are (only) autoloaded are may not actually 
 be evaluated for every node.  The manifest author's intention is often that 
 the top-scope declaration apply only to nodes that declare the class or 
 type associated with the manifest, but that's not the actual semantics.

 Behavior much like what you describe can result: everything works as 
 intended when the master first starts, but after a node checks in that 
 declares a certain class or type, nodes that subsequently check in get 
 cached top-scope declarations that were not intended for them.


 John



-- 
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/c7906b74-3be2-443a-b11a-ac379b94f484%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] very odd Duplicate declaration problem.

2013-12-17 Thread Nathan Earixson
puppet 3.3.2 on RHEL6

If I run puppet on a node:
# sudo puppet agent --test --noop

I get the following error:



*Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: Package[bind] is already declared in file 
/etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at 
/etc/puppet/modules/site/manifests/dns.pp:4 on node 
bushlnxadm01.chicagobooth.eduWarning: Not using cache on failed 
catalogError: Could not retrieve catalog; skipping run*


That's weird. That node isn't a DNS server and shouldn't even be thinking 
about running bind.

If I open /etc/puppet/manifests/site.pp and save the file, the error goes 
away on next puppet agent run.

After about 15 minutes the node starts trying to apply the classes from 
*/etc/puppet/modules/site/manifests/dns_test.pp 
*and after another 5 or so minutes I start getting the duplicate 
declaration error again.

If I save the manifest the puppet agent command works as expected for 
another 15 minutes or so.



I can't even begin to think of where to start looking on this. Any thoughts 
would be appreciated.
This seems to be happening on every node.


-n

-- 
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/74814870-7ff7-49f1-b764-a155afd31168%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Can't find good tutorial/how-to

2013-11-26 Thread Nathan Valentine
Hey, Stephen.

I point people here: https://puppetlabs.com/learn/library. Free
self-directed videos about core Puppet concepts with similar content to the
instructor-led courses. Great resource if a little hard to find on the
website.

-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

-- 
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/CA%2BsYer0_F%2B2ZHW1e7EjOs9j7DhN_xhkxHP%2Bb%3DKjk_7uG3J88hg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Pass aggregate hash to class to declare several defined types

2013-10-30 Thread Nathan Nobbe
Hi,

A bit of background, I'm trying to move from node inheritance to hiera. 
With node inheritance I could declare defined types at several levels, for 
example, say for all of preproduction I'd like a yum repository

*manifests/pre-prod.pp*
class preprod {
  yumrepo { 'preprod-repo': ... }
}

Then add other repos in various sub classes where other specialized 
yumrepo(s) are declared
*manifests/qa.pp*
class qa inherits preprod {
  yumrepo { 'qa': ... }
}

*manifests/dev.pp*
class dev inherits preprod {
  yumrepo {'dev': ... }
}

I'm having a hard time getting this to map to hiera cleanly. I'd like to 
have the data in the hierarchy something like this

*preprod.yaml*
yumrepo::name: preprod-repo
...

*qa.yaml*
yumrepo::name: qa-repo
...

My initial thought was to use hiera_include('classes'), but that doesn't 
work for defined types. What folks on superuser.com have 
suggestedhttp://serverfault.com/questions/549720/hiera-include-equivalent-for-resource-types/549727?noredirect=1#549727is
 to define a wrapper class for *each* declaration of a defined type. 
Something like

class preprod_repo {
  yumrepo { 'preprod-repo': ... }
}

class qa_repo {
  yumrepo { 'qa-repo': ... }
}

Then in the yaml

*preprod.yaml*
classes:
 - preprod_repo
...

*qa.yaml*
classes:
 - qa_repo
...

I really don't want to define a class for every single type instantiation. 
What I'd prefer would be a single class that could capture a merged hash 
from all the yaml files and write out all the type declarations, but I'm 
having trouble with the implementation. From the yaml side, I've got what I 
want, something like this

*preprod.yaml*
classes:
 - yumrepo_hiera

yumrepo_hiera: {
  'preprod_repo' : {
 # attributes for preprod yum repo
  }
}

*qa.yaml*
classes:
 - yumrepo_hiera

yumrepo_hiera: {
  'qa_repo' : {
 # attributes for qa yum repo
  }
}

Now I'm passing an aggregate data object with all the data needed to the 
yumrepo_hieara class. Problem is how to write out all those type 
declarations. Since there's no looping in RDL. I know it's deprecated, but 
the Ruby DSL seems to be my best bet, yet I can't get the hash from hiera 
passed in.., I'm getting this error when I run the agent

undefined method `merge' for :yumrepo_hiera:Symbol

Here's what I've got so far, bear in mind I know nothing of Ruby, but 
hopefully you can get the idea

hostclass :yumrepo_hiera, :yumrepo_hiera do
   @yumrepo_hiera.each do |name, repo|
yumrepo( :name,
 repo[:descr],
 # other parameters to yumrepo type...
 )   
   end
end

Can someone help me get off the ground with this Ruby DSL, or show me a 
better way in general, one where I don't have to write a class per each 
node declaration?

thanks,

-nathan

-- 
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/804125e1-6473-448c-954b-f2c85f249b7f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Pass aggregate hash to class to declare several defined types

2013-10-30 Thread Nathan Nobbe
Solved it with create_resources.

On Wednesday, October 30, 2013 4:58:44 PM UTC-6, Nathan Nobbe wrote:

 Hi,

 A bit of background, I'm trying to move from node inheritance to hiera. 
 With node inheritance I could declare defined types at several levels, for 
 example, say for all of preproduction I'd like a yum repository

 *manifests/pre-prod.pp*
 class preprod {
   yumrepo { 'preprod-repo': ... }
 }

 Then add other repos in various sub classes where other specialized 
 yumrepo(s) are declared
 *manifests/qa.pp*
 class qa inherits preprod {
   yumrepo { 'qa': ... }
 }

 *manifests/dev.pp*
 class dev inherits preprod {
   yumrepo {'dev': ... }
 }

 I'm having a hard time getting this to map to hiera cleanly. I'd like to 
 have the data in the hierarchy something like this

 *preprod.yaml*
 yumrepo::name: preprod-repo
 ...

 *qa.yaml*
 yumrepo::name: qa-repo
 ...

 My initial thought was to use hiera_include('classes'), but that doesn't 
 work for defined types. What folks on superuser.com have 
 suggestedhttp://serverfault.com/questions/549720/hiera-include-equivalent-for-resource-types/549727?noredirect=1#549727is
  to define a wrapper class for *each* declaration of a defined type. 
 Something like

 class preprod_repo {
   yumrepo { 'preprod-repo': ... }
 }

 class qa_repo {
   yumrepo { 'qa-repo': ... }
 }

 Then in the yaml

 *preprod.yaml*
 classes:
  - preprod_repo
 ...

 *qa.yaml*
 classes:
  - qa_repo
 ...

 I really don't want to define a class for every single type instantiation. 
 What I'd prefer would be a single class that could capture a merged hash 
 from all the yaml files and write out all the type declarations, but I'm 
 having trouble with the implementation. From the yaml side, I've got what I 
 want, something like this

 *preprod.yaml*
 classes:
  - yumrepo_hiera

 yumrepo_hiera: {
   'preprod_repo' : {
  # attributes for preprod yum repo
   }
 }

 *qa.yaml*
 classes:
  - yumrepo_hiera

 yumrepo_hiera: {
   'qa_repo' : {
  # attributes for qa yum repo
   }
 }

 Now I'm passing an aggregate data object with all the data needed to the 
 yumrepo_hieara class. Problem is how to write out all those type 
 declarations. Since there's no looping in RDL. I know it's deprecated, but 
 the Ruby DSL seems to be my best bet, yet I can't get the hash from hiera 
 passed in.., I'm getting this error when I run the agent

 undefined method `merge' for :yumrepo_hiera:Symbol

 Here's what I've got so far, bear in mind I know nothing of Ruby, but 
 hopefully you can get the idea

 hostclass :yumrepo_hiera, :yumrepo_hiera do
@yumrepo_hiera.each do |name, repo|
 yumrepo( :name,
  repo[:descr],
  # other parameters to yumrepo type...
  )   
end
 end

 Can someone help me get off the ground with this Ruby DSL, or show me a 
 better way in general, one where I don't have to write a class per each 
 node declaration?

 thanks,

 -nathan



-- 
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/a05af0fe-29e2-41e0-92b3-4e293ddd17d7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Best of Breed Modules?

2013-09-27 Thread Nathan Valentine
Here's what I advise in training classes:

1) Start with puppetlabs/ namespace modules.

2) If you don't find a puppetlabs/ module then you have to know a little
bit about the groups/individuals within the community who have a good rep
for putting out quality modules and identify their namespace. I'll not
favor anyone by mentioning any names here.

3) Lastly I look at the last release date and number of downloads. I want
something both widely used and showing some indication of active
development. If the repo has a Project URL that points to GH etc that can
be a nice thing to inspect as well.

The above determines which ones I'll download for further review.

Hope that helps. BTW, there's a lot work going into the Forge to improve
the above heuristic. Ryan's your guy. :)

-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

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


Re: [Puppet Users] augeas question

2013-09-23 Thread Nathan Valentine
Greg,

I believe resource ini_setting would be appropriate here but I do
understand the desire to learn about Puppet + Augeas.

   augeas { 'vsftpd.conf':
 context = '/etc/vsftpd/vsftpd.conf',
 changes = [ 'set anonymous_enable=NO', 'set chroot_local_user=YES',
],
 require = File['/etc/vsftpd/vsftpd.conf'],
   }


context = '*/files*/vsftpd/vsftpd.conf',

?

I'm lazy and haven't tested with a Puppet apply but I think this might just
be an issue of understanding the namespace-y Augeas stuff. You can test
like so with augtool:

$ augtool ls */files*/vsftpd/vsftpd.conf

-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

-- 
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] Java module woes

2013-09-11 Thread Nathan Nobbe
Hi everyone,

Just getting into Puppet, so please bear with me :D

I'm setting up a java module to keep an eye on the java installation on our 
RHEL machines. Quick background, RHEL ships openjdk, we need to use Oracle 
instead. I've gone ahead and put the latest oracle java6 RPM, *
jre-6u45-linux-amd64*, on one of our puppet-managed boxes.

Like many distributions, RHEL has a utility to manage multiple 
installations of java. I've already set the default version of java to the 
latest oracle, so java -version yields java version 1.6.0_45.

Here is a dead simple java module to verify installation

class java {
  package { 'jre-6u45-linux-amd64':
ensure = installed,
  }
}

This works great, but suppose I change the default by hand, just to gauge 
puppet's reaction.

sudo alternatives --set java /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
java -version
java version 1.6.0_24

Now, when I run sudo puppet agent --test, this is what comes out

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
jre-6u45-linux-amd64' returned 1: Error: Nothing to do

Error: /Stage[main]/Java/Package[jre-6u45-linux-amd64]/ensure: change from 
absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
jre-6u45-linux-amd64' returned 1: Error: Nothing to do

This is actually not what I expected, since* jre-6u45-linux-amd* is 
installed, just not set to be the default. Puppet seems to think the 
package is absent however, any thoughts on the reaction from puppet?

Ultimately what I'd like to achieve is a smooth check / ensure that java is 
installed and at the correct version, but since this is an RPM from outside 
yum I'm running into a little trouble. First off, I'd expect the above 
module to work, even when the correct version isn't configured. The next 
step in my mind would be to coax puppet into running sudo alternatives 
--set java /usr/java/jre1.6.0_45/bin/java if the installation check 
succeeds, but the default isn't correctly set.

I grabbed a *java_version* fact from another groups 
discussionhttps://groups.google.com/forum/#!topic/puppet-users/W67dvqS-GdU, 
and naively the module code would look something like this

# if version check in package resource succeeds ..
if($java_version != '1.6.0_45')
 # run sudo alternatives --set java /usr/java/jre1.6.0_45/bin/java

but I already know enough puppet to know that's not the way to do it :) Can 
you good people help a newb glue this one together?

thanks,

-nathan

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


Re: [Puppet Users] Where does the puppet master get its hostname

2013-09-10 Thread Nathan Valentine
Check both of the following: /etc/hosts and /etc/sysconfig/network.

-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

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


Re: [Puppet Users] Where does the puppet master get its hostname

2013-09-10 Thread Nathan Valentine
Out of curiosity, your Puppet master was spun up how? As a Vagrant VM?


On Tue, Sep 10, 2013 at 3:23 PM, Greg Coit gregc...@gmail.com wrote:

 Man, I could have swear i tested this...

 /etc/sysconfig/network was correct.

 /ets/hosts had:

 ip grover grover.example.com

 I switched that to:

 ip grover.example.com grover

 and the cert is now named grover.example.com.  :)

 Thank you!!!

 Greg

 On Tuesday, September 10, 2013 12:16:12 PM UTC-7, Nathan Valentine wrote:

 Check both of the following: /etc/hosts and /etc/sysconfig/network.

 --
 ---
 Nathan Valentine - nat...@puppetlabs.com

 Puppet Labs Professional Services
 GV: 415.504.2173
 Skype: nrvale0

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




-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

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


Re: [Puppet Users] freebsd clients failing to connect to new master with ssl errors

2013-05-07 Thread Nathan Valentine
This smells like a problem related to incorrect system clock when the cert
was generated for the new master.?.

-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

Join us at PuppetConf 2013, August 22-23 in San Francisco -
http://bit.ly/pupconf13
Register now and take advantage of the Early Bird discount - save 25%!

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




[Puppet Users] Current status of Puppet and MCollective on Windows

2013-04-25 Thread Nathan Shirlberg
We recently (in the last couple of months) installed Puppet to manage 
windows and linux boxes.  Puppet is running great.  The next thing is to 
force puppet to run and push out updates in a coordinated manner rather 
than the randomish 30 minute window.  We installed MCollective on the linux 
boxes and everything works great.  However, I've been trying to install it 
on the windows boxes with very limited success and was wondering where I 
can find the status of windows support with MCollective.  If you could 
point me in the right direction, I would like to help finish out the 
windows implementations.
Thanks,
Nathan

-- 
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] Current status of Puppet and MCollective on Windows

2013-04-25 Thread Nathan Shirlberg
We are running puppet now on about 30 windows boxes (xp to 2008 server and 
everything in between). If you need any help creating or testing install 
packages i would be happy to help. When you build a package for windows do you 
plan to build an MSI that would install everything on the Windows client, just 
use puppet to move all the files, set all the configs, etc. or can mcollective 
be installed on windows boxes using gems only?

-- 
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] Grouping hosts for stage deployment

2013-04-02 Thread Nathan Valentine
Hi,

You probably want to look at implementing a simple deployment pipeline
using Puppet environments and Git branches. Here's a URL for getting
started:

https://puppetlabs.com/blog/git-workflow-and-puppet-environments/



On Tue, Apr 2, 2013 at 9:27 AM, ForumUser p@cmcmarkets.com wrote:

 Hi all,

 I am new in puppet world so please excuse my lack of knowledge ...

 I am going to use puppet to manage our hosts but because my lack of
 knowledge whether I deploy configuration changes the right way
 I would like to deploy them first on some hosts, then wait a few days,
 then on another group of hosts, wait a few days etc.
 So it would be good to group all nodes into groups - something like
 (pseudo-code):

 group pre-testing {
 host02.domain
 host-other.domain
 ... 10 other hosts ...
 }

 group testing {
 host115.domain
 host-other-10.domain
 ... 50 other hosts ...
 }

 group pre-production {
 host-spare.domain
 ... 35 other hosts ...
 }

 group production {
 host-main.domain
 ... 135 other hosts ...
 }

 and then apply the change on just pre-testing, wait a few days, apply on
 just testing, wait a few days and then apply on pre-production etc.
 (sort of deployment in stages).
 I am not able to group nodes based on application running on it nor
 hardware architecture - the environment is mixed
 so I need to put this particular node to this particular group etc

 How would you organise that approach in puppet ?

 Thanks in advanced

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






-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13

-- 
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] Dependency Cycle Question

2013-04-02 Thread Nathan Valentine
Is it possible that the registry_key type, like dirs and subdirs, has an
implied dependency? Sorry, not in a position to test at the moment and I've
actually not used that type in a while.


On Tue, Apr 2, 2013 at 12:09 PM, beyonddc.stor...@gmail.com wrote:

 Hi All,

 I am new to Puppet and have a question on dependency cycle.

 I am currently applying my resource directly using the command prompt on
 Windows 'puppet apply --noop init.pp'.

 When I try to test it, I encounter a dependency cycle error.
 Error: Could not apply complete catalog: Found 1 dependency cycle:
 (Registry_key[delete_hklm_test_foo1_key_step_1_2] =
 Registry_key[delete_hklm_test_key_step_1_3] =
 Registry_key[delete_hklm_test_foo2_key_step_1_1] =
 Registry_key[delete_hklm_test_foo1_key_step_1_2])
 Try the '--graph' option and opening the resulting '.dot' file in
 OmniGraffle or GraphViz

 My init.pp is like this.

 include deletion_key_only
 class deletion_key_only {
 registry_key { 'delete_hklm_test_foo2_key_step_1_1':
 ensure = absent,
 purge_values = false,
 path = 'hklm\software\Test\foo2',
 }
 registry_key { 'delete_hklm_test_foo1_key_step_1_2':
 ensure = absent,
 purge_values = false,
 path = 'hklm\software\Test\foo1',
 require = Registry_Key['delete_hklm_test_foo2_key_step_1_1'],
 }
 registry_key { 'delete_hklm_test_key_step_1_3':
 ensure = absent,
 purge_values = false,
 path = 'hklm\software\Test',
 require = Registry_Key['delete_hklm_test_foo1_key_step_1_2'],
 }
 }

 I am not sure why I hit a dependency cycle error because I thought I have
 the dependency lay out correctly on my manifest where
 'delete_hklm_test_foo2_key_step_1_1' will go first, then
 'delete_hklm_test_foo1_key_step_1_2' and family
 'delete_hklm_test_key_step_1_3'.

 Can anyone please explain why I am encountering a dependency cycle error?

 Thanks!

 David

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






-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13

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




[Puppet Users] Re: One Dashboard for Multiple Masters

2013-03-19 Thread Nathan Long
I ended up figuring it out myself finally. In order to accomplish this you 
need to set up PuppetDB. Then you point all masters to PuppetDB as the 
inventory service and Puppet Dashboard will pull from there instead of the 
master directly. Of course, in order to point multiple masters at PuppetDB 
you need to have a central CA. In my case the nodes connecting to my second 
master didn't have direct access to the CA so I had to set up apache with 
passenger and proxy my CA requests to the central CA. Now everything works 
and I'm getting facts for all machines in my dashboard.

On Thursday, March 14, 2013 4:56:04 PM UTC-5, Nathan Long wrote:

 I'm trying to connect multiple masters to one dashboard and I'm having 
 trouble with Facter. I started out initially with one master connected to 
 the dashboard and that one works perfectly fine. Then I added a second 
 master by setting the reporturl to point to the dashboard. The new nodes 
 appeared and it shows the run results without any problems. The issue I'm 
 having is when I try to look at the facts all I have is an error saying 
 Could 
 not retrieve facts from inventory service: 404 Could not find facts 
 .domain where xxx.domain is my actual hostname. I know facter works 
 because on the second puppet master I can run a puppet facts find command 
 and pull the facts about the machine. Has anybody else attempted this 
 before and run into this problem?

 Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+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.




[Puppet Users] One Dashboard for Multiple Masters

2013-03-15 Thread Nathan Long
I'm trying to connect multiple masters to one dashboard and I'm having 
trouble with Facter. I started out initially with one master connected to 
the dashboard and that one works perfectly fine. Then I added a second 
master by setting the reporturl to point to the dashboard. The new nodes 
appeared and it shows the run results without any problems. The issue I'm 
having is when I try to look at the facts all I have is an error saying Could 
not retrieve facts from inventory service: 404 Could not find facts 
.domain where xxx.domain is my actual hostname. I know facter works 
because on the second puppet master I can run a puppet facts find command 
and pull the facts about the machine. Has anybody else attempted this 
before and run into this problem?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+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.




[Puppet Users] Re: Site module with Puppet Enterprise

2013-03-06 Thread Nathan Valentine
Paleoposting FTW!

I've been doing enough work with site modules as of late that I decided to 
make a git repo with a basic site module set up for following Craig Dunn's 
Roles and Profiles pattern. Or at least something very similar (no 
inheritance):

https://github.com/nvalentine-puppetlabs/site.git

Nothing groundbreaking but an easy 'git clone' as opposed to putting 
together the scaffolding every time. 

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




[Puppet Users] Using Puppet with Windows MSIs

2013-03-04 Thread Nathan Shirlberg
I want to use Puppet to manage deployment of internal .Net software.  The 
CI build can generate a versioned MSI file and push that out to Puppet.  I 
am creating an MSI with the same name, but different versions for each 
release.  Puppet detects the missing Package and properly installs the new 
Package from MSI.  However, Puppet does not detect that a new MSI needs to 
replace the already installed package.  My problem seems to be the same as  
this 
closed issue http://projects.puppetlabs.com/issues/13104.  I am running 
3.1.0.

My plan for deployment has been to have each CI build create the 
appropriately versioned MSI files and deploy them to Puppet as desired. 
 Then, let Puppet compare the MSI versions to the versions already 
installed and install the new MSI if necessary.

Do I have a simple bug in my implementation or do I have a bad strategy.  I 
am considering the following:
1) Modify puppet windows package source to compare versions installed to 
the version of the MSI.
2) Abort the MSI strategy and have each build generate a manifest that uses 
the windows resources directly to complete the install (file, service, 
scheduled task, IIS, etc).  I think I will need to create an Assembly 
resource that can install dlls to the GAC.
3) Put the version number as part of the package name.  Thus forcing Puppet 
to manage each version as a separate package.  I'd rather not do this 
because it will mean generating quite a bit of manifest code as part of the 
build to ensure that previous versions are uninstalled and adding the new 
version to the manifest.

Thanks,
Nathan

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




[Puppet Users] Re: Windows MSIs and detecting version changes.

2013-03-04 Thread Nathan Shirlberg
I am sorry to spam the board here, but I did not realize that the post was 
held for moderation and then tried a similar post again.  Please disregard 
this post and reply to this 
one. 
https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/NRYgzNW7ihc

On Monday, March 4, 2013 10:11:01 AM UTC-6, Nathan Shirlberg wrote:

 Puppet Package for windows MSI correctly detects whether the Package is 
 installed or not, but will not detect that the new MSI file is newer and 
 thus the Package needs to be updated.  My seems almost identical to 
 http://projects.puppetlabs.com/issues/13104. Which was closed a year 
 ago...  I am using Puppet Community 3.1.0

 I want to use Puppet to deploy our software internally.  We run mostly 
 .net applications and are coming from an in-house deployment script that is 
 lacking in several features that Puppet is really strong in.  My plan is to 
 append an MSI generation to the end of each build and then use Puppet to 
 selectively install the application(s).  I have created MyApplication.msi 
 (version 1.0.1) and a later release MyApplicaiton.msi (version 1.0.2).

 My Puppet manifest is as follows:
 package { 'MyApplication':
   ensure  = installed,
   source  = 
 'C:\ProgramData\PuppetLabs\puppet\etc\modules\MyApplication.msi',
   install_options = { 'INSTALLDIR' = 'C:\...\MyApplication' },
 }
 When I run version 1.0.1, Puppet detects that the Package is missing and 
 installs it appropriately.  When I replace the msi with the new version and 
 run Puppet, I expect that Puppet would recognize that the Package installed 
 is version 1.0.1 and the MSI provided is version 1.0.2 and thus install the 
 new version. I have tried setting ensure to be the specific version of the 
 new MSI, but that gets an error because Windows Package does not implement 
 Versionable.  Any thoughts or suggestions about using this method of 
 deployment with Puppet?

 I am considering: 
 1) modify the 
 sourcehttps://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/windows/msi_package.rb
  to 
 recognize the versions and require the install
 2) aborting the MSI and train developers to write puppet manifests that 
 utilize the windows resources directly (files, services, scheduled tasks, 
 etc)
 3) treating each version as it's own unique package and script the build 
 to ensure = absent for the old versions and ensure = installed for the 
 latest version

  


-- 
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] Checking GIT updates

2013-02-14 Thread Nathan Valentine
Hey, John.

llowder's recommendation is solid. There's a write-up on how to accomplish
the push/post-commit strategy here:

https://puppetlabs.com/blog/git-workflow-and-puppet-environments/


-- 
---
Nathan Valentine - nat...@puppetlabs.com
Puppet Labs Professional Services
GV: 415.504.2173
Skype: nrvale0

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




[Puppet Users] Configuration for modules

2012-12-08 Thread Nathan Ward
I'm writing a module (with new types and new providers) to configure Splunk 
(either main servers or forwarders) that uses the Splunk REST API.

This API needs some authentication information, and I'd like that to be 
configurable per-host (ie per host that puppet agent runs on).

Is there a standard way to do this? Should I drop a new file in to 
/etc/puppet/splunk.conf (or similar) with the config parameters I want to 
use, or even better, is there a nice well defined way to do this through a 
manifest?

I've thought about setting a global parameter, I have two classes; 
'splunk-monitor' and 'splunk-user'. Planning to make these both inherit 
from a common class 'Puppet::Provider::Splunk' with some common utilities 
like REST HTTP things - I copied this approach from the package providers.

If I were to set global parameters, would I need to define it like so:
Splunk-monitor {
  parameter = blah
}
Splunk-user {
  the_same_parameter_again = blah
}

.. or is there a way to define global configuration for the parent that 
applies to both:
Splunk {
  common_parameter = blah
}

Not sure how this would work when considering enumerating all the existing 
instances of configuration that this module adds - there can be many splunk 
monitor instances configured, so I'd want to enumerate them first, much 
like how the package providers enumerate installed packages first.

I've tried to think about modules that need authentication information to 
analyse for some best practices, but haven't come across any.

Any pointers in the right direction would be greatly appreciated.

-- 
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/-/0_B3uZ07G9AJ.
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: augeas syntax for adding similar lines to hosts.allow

2012-11-07 Thread Nathan Huff
You are going to probably need something along the lines of

context = '/files/etc/hosts.allow'
changes = [
  'ins 01 after *[last()]',
  'set 01/process[1] ssh',
  'set 01/process[2] ssh2',
  'set 01/client ipaddr'
]
onlyif = 'match *[process[1] == 'ssh' and 'client' == 'ipaddr'] size == 0'

you might need to tweak it a little I didn't try it verbatim, but it should 
get you on the right track.

On Tuesday, November 6, 2012 1:37:08 PM UTC-6, Chad Lewis wrote:

 I've found a similar thread here, but it doesn't do quite what I need.

 https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/VMloh1KrSew

 I have multiple lines of the form below in hosts.allow:

 sshd,sshd2: 1.1.1.1
 sshd,sshd2: 2.2.2.2
 etc.

 I'm struggling with the syntax to add yet another sshd,sshd2: client 
 line to hosts.allow.

 augtool is treating the lines as follows
 augtool ls /files/etc/hosts.allow/*[last()]
 process[1] = sshd
 process[2] = sshd2
 client = 3.3.3.3

 I need to add another line when the processes already exist, but the 
 client is new.

 Any suggestions?



-- 
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/-/MiixJMy20jQJ.
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] Puppet 3.0 rspec and custom resources

2012-11-05 Thread Nathan Huff
So I dug into this a little more.  It has something to do with how puppet 
is loading the type definitions. 
There appears to be some kind of cache that gets loaded with type 
definitions when the first manifest gets processed.
If the first test that gets run is for a class that contains all the types 
necessary for classes that get tested later everything runs fine.
If on the other hand if the first test run is for a class that doesn't 
contain all the types used in later classes the later test fails. 

Given the example I posted
This works correctly.
rspec spec/classes/test_spec.rb spec/classes/test__c_spec.rb
This doesn't
rspec spec/classes/test__c_spec.rb spec/classes/test_spec.rb

Running them both separately works too.

On Monday, October 29, 2012 2:48:25 PM UTC-5, Nathan Huff wrote:

 Looks like the subnamespace thing isn't important either.  Just having two 
 classes triggers this as well.

 On Monday, October 29, 2012 1:13:05 PM UTC-5, Nathan Huff wrote:

 OK so I have what I think is a minimal test case here:

 https://github.com/nhuff/spec-failure

 The readme has a list of gems I have installed in it.

 You seem to need spec tests for two classes, one of which is in a sub 
 namespace of the other.
 In this case 'test' and 'test::c'.  With both spec files in place the 
 system complains about anchor not being defined.
 If you remove the test file for test::c the test for class test will pass.



-- 
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/-/6MSfkla3fzMJ.
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] Puppet 3.0 rspec and custom resources

2012-10-29 Thread Nathan Huff
A super simple module that just has a file and anchor resources works fine 
so it isn't that things aren't getting loaded at all.  I am going to start 
ripping things out of my more complex module and see if I can track down 
the trigger.

On Friday, October 26, 2012 5:35:07 PM UTC-5, Jeff McCune wrote:

 Hrmmm. 

 Is there a small rspec example you could post that reproduces this 
 issue?  I'd love to try and reproduce it since there's definitely a 
 possibility that a change between Puppet 2.7 and 3.0 is responsible 
 for this issue. 

 -Jeff 

 On Fri, Oct 26, 2012 at 8:01 AM, Nathan Huff 
 nathan@gmail.comjavascript: 
 wrote: 
  I am trying to figure out if I am missing something simple here.  After 
  upgrading to puppet 3.0 running puppet-rspec tests that use 
  custom resources from modules in the fixtures directory are failing.  I 
 have 
  a module that uses the anchor type and with 2.7.19 it works fine. 
  After upgrading to 3.0 all of the tests are failing with 
  
  Puppet::Error: 
 Puppet::Parser::AST::Resource failed with error ArgumentError: 
  Invalid resource type anchor at 
  
 /home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp:2 
 on 
  node enyo.localhost 
  
  The debug output is 
  Debug: importing 
  '/home/nrhuff/repos/puppet-os/spec/fixtures/manifests/site.pp' in 
  environment production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/stdlib/manifests/init.pp' 

  in environment production 
  Debug: Automatically imported stdlib from stdlib into production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/stdlib/manifests/stages.pp'
  

  in environment production 
  Debug: Automatically imported stdlib::stages from stdlib/stages into 
  production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp' 
 in 
  environment production 
  Debug: Automatically imported os from os into production 
  Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
  Invalid resource type anchor at 
  
 /home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp:2 
 on 
  node enyo.localhost 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/resource.rb:218:in
  

  `initialize' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/resource.rb:120:in
  

  `initialize' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:44:in
  

  `new' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:44:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/util/errors.rb:35:in
  

  `exceptwrap' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:43:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:42:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:42:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/module.rb:283:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/branch.rb:16:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/branch.rb:15:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:25:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:25:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast.rb:62:in
  

  `safeevaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:25:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:20:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:20:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast.rb:62:in
  

  `safeevaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/resource/type.rb:136:in
  

  `evaluate_code' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/resource.rb:81:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/compiler.rb
  

  :165:in `evaluate_classes' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/compiler.rb:150:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/compiler.rb:150:in
  

  `evaluate_classes' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/functions/include.rb:11

Re: [Puppet Users] Puppet 3.0 rspec and custom resources

2012-10-29 Thread Nathan Huff
OK so I have what I think is a minimal test case here:

https://github.com/nhuff/spec-failure

The readme has a list of gems I have installed in it.

You seem to need spec tests for two classes, one of which is in a sub 
namespace of the other.
In this case 'test' and 'test::c'.  With both spec files in place the 
system complains about anchor not being defined.
If you remove the test file for test::c the test for class test will pass.

On Monday, October 29, 2012 10:36:50 AM UTC-5, Nathan Huff wrote:

 A super simple module that just has a file and anchor resources works fine 
 so it isn't that things aren't getting loaded at all.  I am going to start 
 ripping things out of my more complex module and see if I can track down 
 the trigger.

 On Friday, October 26, 2012 5:35:07 PM UTC-5, Jeff McCune wrote:

 Hrmmm. 

 Is there a small rspec example you could post that reproduces this 
 issue?  I'd love to try and reproduce it since there's definitely a 
 possibility that a change between Puppet 2.7 and 3.0 is responsible 
 for this issue. 

 -Jeff 

 On Fri, Oct 26, 2012 at 8:01 AM, Nathan Huff nathan@gmail.com 
 wrote: 
  I am trying to figure out if I am missing something simple here.  After 
  upgrading to puppet 3.0 running puppet-rspec tests that use 
  custom resources from modules in the fixtures directory are failing.  I 
 have 
  a module that uses the anchor type and with 2.7.19 it works fine. 
  After upgrading to 3.0 all of the tests are failing with 
  
  Puppet::Error: 
 Puppet::Parser::AST::Resource failed with error ArgumentError: 
  Invalid resource type anchor at 
  
 /home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp:2 
 on 
  node enyo.localhost 
  
  The debug output is 
  Debug: importing 
  '/home/nrhuff/repos/puppet-os/spec/fixtures/manifests/site.pp' in 
  environment production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/stdlib/manifests/init.pp'
  

  in environment production 
  Debug: Automatically imported stdlib from stdlib into production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/stdlib/manifests/stages.pp'
  

  in environment production 
  Debug: Automatically imported stdlib::stages from stdlib/stages into 
  production 
  Debug: importing 
  
 '/home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp' 
 in 
  environment production 
  Debug: Automatically imported os from os into production 
  Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
  Invalid resource type anchor at 
  
 /home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp:2 
 on 
  node enyo.localhost 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/resource.rb:218:in
  

  `initialize' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/resource.rb:120:in
  

  `initialize' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:44:in
  

  `new' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:44:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/util/errors.rb:35:in
  

  `exceptwrap' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:43:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:42:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:42:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/module.rb:283:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/branch.rb:16:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/branch.rb:15:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:25:in
  

  `collect' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/resource.rb:25:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast.rb:62:in
  

  `safeevaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:25:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:20:in
  

  `each' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast/astarray.rb:20:in
  

  `evaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/ast.rb:62:in
  

  `safeevaluate' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/resource/type.rb:136:in
  

  `evaluate_code' 
  
 /home/nrhuff/.rvm/gems/ruby-1.8.7-p358/gems/puppet-3.0.1/lib/puppet/parser/resource.rb:81

Re: [Puppet Users] Puppet 3.0 rspec and custom resources

2012-10-29 Thread Nathan Huff
Looks like the subnamespace thing isn't important either.  Just having two 
classes triggers this as well.

On Monday, October 29, 2012 1:13:05 PM UTC-5, Nathan Huff wrote:

 OK so I have what I think is a minimal test case here:

 https://github.com/nhuff/spec-failure

 The readme has a list of gems I have installed in it.

 You seem to need spec tests for two classes, one of which is in a sub 
 namespace of the other.
 In this case 'test' and 'test::c'.  With both spec files in place the 
 system complains about anchor not being defined.
 If you remove the test file for test::c the test for class test will pass.


-- 
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/-/FO2lFrl_wjYJ.
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 3.0 + Inventory search

2012-10-04 Thread Nathan Flynn
Hello,

I am having problems with Puppet since upgrading to 3.0.0.

When I call an inventory search I get a Error 400. I have used dashboard + 
Perl

Oct  4 08:58:43 puppet01 puppet-master[7008]: Handling request: GET 
/production/facts_search/search?facts.lsbdistcodename.eq=lenny
Oct  4 08:58:43 puppet01 puppet-master[7008]: header too long


ii  facter  1.6.12-1puppetlabs2  Ruby 
module for collecting simple facts about a host operating system
ii  hiera   1.0.0-1puppetlabs2   A 
simple pluggable Hierarchical Database.
ii  puppet  3.0.0-1puppetlabs1   
Centralized configuration management - agent startup and compatibility 
scripts
ii  puppet-common   3.0.0-1puppetlabs1   
Centralized configuration management
ii  puppet-dashboard1.2.11-1puppetlabs1  
Dashboard for Puppet
ii  puppetdb1.0.0-1puppetlabs1   
PuppetDB Centralized Storage.
ii  puppetdb-terminus   1.0.0-1puppetlabs1   
Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
ii  puppetmaster3.0.0-1puppetlabs1   
Centralized configuration management - master startup and compatibility 
scripts
ii  puppetmaster-common 3.0.0-1puppetlabs1   Puppet 
master common scripts
ii  puppetmaster-passenger  3.0.0-1puppetlabs1   
Centralised configuration management - master setup to run under mod 
passenger
ii  vim-puppet  3.0.0-1puppetlabs1   syntax 
highlighting for puppet manifests in vim

-- 
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/-/QNQWubob8lYJ.
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 3.0 + Inventory search

2012-10-04 Thread Nathan Flynn
Error from puppet master trace;

Oct  4 13:51:42 puppet01 puppet-master[1893]: Handling request: GET 
/production/facts_search/search?facts.lsbdistcodename.eq=lenny
Oct  4 13:51:42 puppet01 puppet-master[1893]: header too long
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/vendor_ruby/puppet/network/http/rack/rest.rb:86:in 
`initialize'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/vendor_ruby/puppet/network/http/rack/rest.rb:86:in `new'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/vendor_ruby/puppet/network/http/rack/rest.rb:86:in 
`client_cert'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:69:in `process'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/vendor_ruby/puppet/network/http/rack.rb:21:in `call'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in 
`process_request'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in 
`main_loop'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:118:in `run'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:65:in 
`spawn_application'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:58:in 
`spawn_application'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:41:in 
`spawn_application'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:159:in 
`spawn_application'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in 
`handle_spawn_application'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in 
`start_synchronously'
Oct  4 13:51:42 puppet01 puppet-master[1893]: 
/usr/lib/phusion_passenger/passenger-spawn-server:61

On Thursday, 4 October 2012 10:00:34 UTC+1, Nathan Flynn wrote:

 Hello,

 I am having problems with Puppet since upgrading to 3.0.0.

 When I call an inventory search I get a Error 400. I have used dashboard + 
 Perl

 Oct  4 08:58:43 puppet01 puppet-master[7008]: Handling request: GET 
 /production/facts_search/search?facts.lsbdistcodename.eq=lenny
 Oct  4 08:58:43 puppet01 puppet-master[7008]: header too long


 ii  facter  1.6.12-1puppetlabs2  Ruby 
 module for collecting simple facts about a host operating system
 ii  hiera   1.0.0-1puppetlabs2   A 
 simple pluggable Hierarchical Database.
 ii  puppet  3.0.0-1puppetlabs1   
 Centralized configuration management - agent startup and compatibility 
 scripts
 ii  puppet-common   3.0.0-1puppetlabs1   
 Centralized configuration management
 ii  puppet-dashboard1.2.11-1puppetlabs1  
 Dashboard for Puppet
 ii  puppetdb1.0.0-1puppetlabs1   
 PuppetDB Centralized Storage.
 ii  puppetdb-terminus   1.0.0-1puppetlabs1   
 Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
 ii  puppetmaster3.0.0-1puppetlabs1   
 Centralized configuration management - master startup and compatibility 
 scripts
 ii  puppetmaster-common 3.0.0-1puppetlabs1   
 Puppet master common scripts
 ii  puppetmaster-passenger  3.0.0-1puppetlabs1   
 Centralised configuration management - master setup to run under mod 
 passenger
 ii  vim-puppet  3.0.0-1puppetlabs1   
 syntax highlighting for puppet manifests in vim



-- 
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/-/3t16LS_D0pcJ.
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 3.0 + Inventory search

2012-10-04 Thread Nathan Flynn
Ah thank you.

Yes it appear I am hit with bug 16769. I did see the bug but thought it was 
not related as puppet ca seemed to be working, only the inventory search 
functions seem to be affected.

Disabling +ExportCertData has resolved the problem. Looking forward to 
3.0.1.



On Thursday, 4 October 2012 10:00:34 UTC+1, Nathan Flynn wrote:


Hello,

 I am having problems with Puppet since upgrading to 3.0.0.

 When I call an inventory search I get a Error 400. I have used dashboard + 
 Perl

 Oct  4 08:58:43 puppet01 puppet-master[7008]: Handling request: GET 
 /production/facts_search/search?facts.lsbdistcodename.eq=lenny
 Oct  4 08:58:43 puppet01 puppet-master[7008]: header too long


 ii  facter  1.6.12-1puppetlabs2  Ruby 
 module for collecting simple facts about a host operating system
 ii  hiera   1.0.0-1puppetlabs2   A 
 simple pluggable Hierarchical Database.
 ii  puppet  3.0.0-1puppetlabs1   
 Centralized configuration management - agent startup and compatibility 
 scripts
 ii  puppet-common   3.0.0-1puppetlabs1   
 Centralized configuration management
 ii  puppet-dashboard1.2.11-1puppetlabs1  
 Dashboard for Puppet
 ii  puppetdb1.0.0-1puppetlabs1   
 PuppetDB Centralized Storage.
 ii  puppetdb-terminus   1.0.0-1puppetlabs1   
 Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
 ii  puppetmaster3.0.0-1puppetlabs1   
 Centralized configuration management - master startup and compatibility 
 scripts
 ii  puppetmaster-common 3.0.0-1puppetlabs1   
 Puppet master common scripts
 ii  puppetmaster-passenger  3.0.0-1puppetlabs1   
 Centralised configuration management - master setup to run under mod 
 passenger
 ii  vim-puppet  3.0.0-1puppetlabs1   
 syntax highlighting for puppet manifests in vim



-- 
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/-/Sg_EhfBIgicJ.
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] undefined method `has_fact_with_value' for #Class:0x7eff09faf2f8

2012-05-18 Thread Nathan Flynn
Hello,

When I do a facts search I get an error;

Example;

https://puppet01.admin.X.net.uk:8140/production/facts_search/search?facts.operatingsystem=Debian

undefined method `has_fact_with_value' for #Class:0x7eff0a00c930


Any help on tracking this down would be greatly appreciated.

The error is also in the log;

May 18 13:51:15 puppet01 puppet-master[14516]: Handling request: GET 
/production/facts_search/search?facts.operatingsystem=Debian
May 18 13:51:15 puppet01 puppet-master[14516]: undefined method 
`has_fact_with_value' for #Class:0x7eff09faf2f8

root@puppet01:/usr/share/puppet/rack# dpkg -l | grep puppet
ii  facter  1.6.9-1puppetlabs1   Ruby 
module for collecting simple facts about a host operating system
ii  puppet  2.7.14-1puppetlabs1  
Centralized configuration management - agent startup and compatibility 
scripts
ii  puppet-common   2.7.14-1puppetlabs1  
Centralized configuration management
ii  puppet-dashboard1.2.7-1puppetlabs1   
Dashboard for Puppet
ii  puppet-testsuite2.7.14-1puppetlabs1  
Centralized configuration management - test suite
ii  puppetmaster2.7.14-1puppetlabs1  
Centralized configuration management - master startup and compatibility 
scripts
ii  puppetmaster-common 2.7.14-1puppetlabs1  Puppet 
master common scripts
ii  puppetmaster-passenger  2.7.14-1puppetlabs1  
Centralised configuration management - master setup to run under mod 
passenger

-- 
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/-/c_2F9qiAtlwJ.
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] support on rhel / epel

2012-05-16 Thread Nathan Powell
augeas comes from the rhel optional channel.  You'll have to enable that.

On Wed, May 16, 2012 at 12:13 PM, Tim Coote tim.coo...@googlemail.com wrote:
 Hullo
 I'm trying to install puppet on some rhel 6.2 boxes, which have epel
 repo installed. However, I'm getting dependency errors for augeas-
 libs:

 Error: Package: ruby-augeas-0.4.1-1.el6.x86_64 (epel)
           Requires: augeas-libs = 0.8.0
           Installed: augeas-libs-0.7.2-6.el6.x86_64 (@rhel-x86_64-
 server-6.1.z)

 And I cannot google any other instances of this issue.

 epel doesn't carry augeas-libs, so I'm not very clear on how it
 manages to carry puppet, which depends on it.

 Any thoughts?

 Tim

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




-- 
Nathan Powell
Linux System Administrator

This machine kills fascists ~ Woody Guthrie

-- 
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] Includes and parametrized class redefinition

2012-04-27 Thread Andre Nathan
Hello

I have some code that works like the simplified clase shown below. The idea 
is to have a define foo that includes a class foo::pre which contains 
resources that need to be executed before the define is called. The define 
can be called multiple times but the initialization has to be done only 
once, which is why it's implemented as a class:

class foo::pre {
  notice(foo::pre)
}
define foo() {
  include 'foo::pre'
  notice(foo)
}
class x {
  notice(x)
  foo { 'x foo':
  }
}
class y {
  notice(y)
  foo { 'y foo':
  }
}
include x
include y

The issue is that now I need to parametrize foo::pre so that its behavior 
depends on a variable that exists in foo:

class foo::pre($blah) {
  notice(foo::pre)
}
define foo() {
  class { 'foo::pre':
blah = 1,
  }
  notice(foo)
}
class x {
  notice(x)
  foo { 'x foo':
  }
}
class y {
  notice(y)
  foo { 'y foo':
  }
}
include x
include y

With this code I get Duplicate definition: Class[Foo::Pre] is already 
defined. This seems weird to me because I thought the class { 'myclass': 
} syntax was semantically equivalent to include myclass. Puppet, 
however, complains that it's being defined twice, even though there's no 
definition happening there, just inclusion.

So, is there a way to redesign this to match the original behavior? I know 
the current trend is to keep this kind of thing in hiera but this is 
already a fairly large code base that can't be changed quickly...

Thanks in advance,
Andre

-- 
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/-/dll5ilVD_60J.
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: Includes and parametrized class redefinition

2012-04-27 Thread Andre Nathan
Hello John

On Friday, April 27, 2012 9:58:09 AM UTC-3, jcbollinger wrote:

 I know it's not what you want to hear, but Hiera is your best bet.  I 
 don't think the code base size is relevant, because I don't think the 
 time and effort to implement an Hiera-based class data source is 
 likely to differ much from what parameterizing all the same classes 
 would require.  Or to put it a different way, solving your problem via 
 class parameterization would require *at least* as much shakeup of 
 your code base as would implementing an hiera-based solution. 


Well, the thing is that we're in the middle of a transition process that is 
moving from everything is a global variable in the node to parametrized 
classes, and while they are not perfect, I found that our new code is much 
saner and easier to debug when using them.

So the question is, are parametrized classes now considered deprecated? I 
remember reading somewhere that improvements were being made for Puppet 
2.8... While I can see the advantages of Hiera, it seems to me that it's 
another instance of the global variable problem if it's used to load values 
inside some class, and I'd rather not lose the benefit of being able to 
check a class signature to see immediately what variables it needs, and 
having the code fail if any is not provided.

Thanks,
Andre

-- 
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/-/eA93Ge_3z2kJ.
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] Help with parametrized class include

2012-04-26 Thread Andre Nathan
Hello

I have some puppet code that does the equivalent of the following. The
idea is to have a define foo with some actions that must be executed
before it runs (foo::pre). Since the resources in foo::pre can
only be defined once, it's implemented as a class, and included from
the define:

class foo::pre {
  notice(foo::pre)
}
define foo() {
  include 'foo::pre'
  notice(foo)
}
class x {
  notice(x)
  foo { 'x foo':
  }
}
class y {
  notice(y)
  foo { 'y foo':
  }
}
include x
include y

My problem starts when I need to parametrize class foo::pre:

class foo::pre($blah) {
  notice(foo::pre)
}
define foo() {
  class { 'foo::pre':
blah = 1,
  }
  notice(foo)
}
class x {
  notice(x)
  foo { 'x foo':
  }
}
class y {
  notice(y)
  foo { 'y foo':
  }
}
include x
include y

When I try to apply this code, I get the error Duplicate definition:
Class[Foo::Pre] is already defined.

I always thought that the class { 'someclass': } syntax was
equivalent to include someclass, but it seems that in the former,
Puppet treats it as a class definition and not just an include (even
though that's not where the class is defined).

Is there any way around this, or another way to achieve this with
parametrized classes?

Thanks in advance,
Andre

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



Re: [Puppet Users] 32bit and 64bit version of a package

2012-02-23 Thread Nathan Powell
On Thu, Feb 23, 2012 at 5:57 PM, Alan Laird a...@laird.net wrote:
 I'm trying to write a recipe to install the latest libstdc++ in both
 32bit and 64bit flavors and running into issues.  Yum only wants to
 install the 64bit version if I do:

 yum install libstdc++

 If I do something like:

 package { libstdc++.i386 : ensure = latest }

 It tells me nothing to do

What does it say if you do:

  sudo yum -q install libstdc++.i386


-- 
Nathan Powell
Linux System Administrator

Now I see it clearly. My whole life is pointed in one direction. I
see that now. There never has been any choice for me. ~ Travis Bickle

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



Re: [Puppet Users] Sorted hash in template example

2012-02-23 Thread Nathan Powell
On Thu, Feb 23, 2012 at 5:20 PM, Jared Curtis ja...@shift-e.info wrote:
 Does anyone have a better solution?

Better?  I dunno.  But an array of hashes will do what you want as well.

dbs = [{:foo = 'bar'}, {:hai = 'bai'} ]

dbs[0] etc.


-- 
Nathan Powell
Linux System Administrator

Now I see it clearly. My whole life has pointed in one direction. I
see that now. There never has been any choice for me. ~ Travis Bickle

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



Re: [Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread Nathan Powell
On Tue, Feb 21, 2012 at 9:57 AM, jcbollinger john.bollin...@stjude.org wrote:
 Alternatively,

 `yum -q check-update | grep '\\w' | wc --lines`.chomp

Yep, lots of ways to do it.

 sudo is not needed to run yum queries, and avoiding sudo when you
 don't need it is good practice.  Personally, I find that command a lot

Good point.  I was testing in irb as a regular user and just cut and
paste what I did into the email.  It shouldn't have sudo in there.

 more legible than the Ruby split / reject / length business, too,
 though YMMV.

I think method chaining and the functional aspects (reject) of Ruby
are elegant and use them every chance I get.  Both are fine and valid
though.


-- 
Nathan Powell
Linux System Administrator

Where else would you rather be than right here, right now?
~ Marv Levy

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



Re: [Puppet Users] Problem with Custom Facter

2012-02-20 Thread Nathan Powell
On Mon, Feb 20, 2012 at 5:33 PM, Matt Mencel m...@techminer.net wrote:
 The output I get back in my fact reports only contains a string with 
  updates in it, so no number.  However, if I paste the code inside the
 setcode block into a test.rb scriptit works just fine.

Are you testing this code on the same version of EL that you are
deploying to?  AFACT #lines wasn't added until 1.8.7 and if you are
deploying to EL5 you don't have that.


-- 
Nathan Powell
Linux System Administrator

Where else would you rather be than right here, right now?
~ Marv Levy

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



Re: [Puppet Users] Problem with Custom Facter

2012-02-20 Thread Nathan Powell
On Mon, Feb 20, 2012 at 5:33 PM, Matt Mencel m...@techminer.net wrote:
 I am trying to write a custom facter for CentOS/RHEL that tells me how many
 updates are found on a run of 'yum check-update'

Sorry I replied hastily.  After replying I thought about what you're
trying to do.  You don't need all those gyrations to get this data

Tested quickly on RHEL6 and CentOS5:

`sudo yum check-update -q`.split(/\n/).reject{|i| i == }.length

-- 
Nathan Powell
Linux System Administrator

Where else would you rather be than right here, right now?
~ Marv Levy

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



Re: [Puppet Users] Dashboard using extlookup

2012-02-06 Thread Nathan Flynn
Hello,

I have been playing around with this today and have managed to get it working.

It appears if you are using puppet-dashboard and use external nodes you do not 
need to call extlookup() to access to variable, it is just globally available.


Example:
root@puppet01:/etc/puppet# /usr/share/puppet-dashboard/bin/external_node 
puppet01.admin.zen.net.uk
--- 
name: puppet01.admin.isp.net.uk
parameters: 
  centrify_nbname: puppet01admin
  centrify_groups: g_admin g_admin_admins
  centrify_domain: domain.isp.net.uk

--

class centrifydc
 {

$netbiosname = $centrify_nbname
$domain = $centrify_domain
$groups_allow = $centrify_groups

   exec { adjoin:
path = /usr/bin:/usr/sbin:/bin,
returns = 15,
command = adjoin -S -w $domain -n $netbiosname,
refreshonly = true,
}



On 6 Feb 2012, at 17:06, Nan Liu wrote:

 On Sun, Feb 5, 2012 at 2:12 PM, eper e...@eper.net wrote:
 I have been working on this for several hours now and still seems not
 to be working. I am unsure if its a bug or I am doing something wrong.
 
 [master]
 node_terminus  = exec
 external_nodes = /usr/share/puppet-dashboard/bin/external_node
 
 If I execute the external node command it returns values;
 root@puppet01:/usr# /usr/share/puppet-dashboard/bin/external_node
 
 Can you run this command as the puppet user?
 
 Thanks,
 
 Nan
 
 -- 
 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] Chaining behavior

2011-10-24 Thread Andre Nathan
Hello

I'm experimenting with the new resource chaining syntax. Here's the
code:

  class first { notice(first) }
  class second { notice(second) }
  class third { notice(third) }

  include third
  include second
  include first

  Class[first] - Class[second] - Class[third]

Shouldn't the last line guarantee that the classes are executed in
that specific order?

Thanks in advance,
Andre

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



Re: [Puppet Users] How-To Question: Installing a service that does not come in an RPM ?

2011-10-18 Thread Nathan Clemons
The one thing that I'll mention is that you want to use hasstatus = true
whenever possible, I've found, at least on older versions of Puppet
(0.25.x). Sometimes the logic it tries to use otherwise doesn't quite work,
but using the /etc/init.d/servicename status check seems to work fine.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Tue, Oct 18, 2011 at 1:40 PM, Christopher Wood 
christopher_w...@pobox.com wrote:

 On Tue, Oct 18, 2011 at 08:21:34PM +, Dan White wrote:
  Are there any exapmples out there that show an intelligent way to do this
 ?

 http://docs.puppetlabs.com/references/stable/type.html#service

 That makes it sound like as long as you have the right init script (or
 platform-specific variant thereof) installed, puppet will do the right
 thing.

  My searches are not turning up anything useful
 
  “Sometimes I think the surest sign that intelligent life exists elsewhere
 in the universe is that none of it has tried to contact us.”
  Bill Waterson (Calvin  Hobbes)
 
  --
  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.



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



Re: [Puppet Users] How-To Question: Installing a service that does not come in an RPM ?

2011-10-18 Thread Nathan Clemons
If it's a straightforward compilation, you should be able to do this with a
set of chained execs.

For instance, a file resource to push the tarball, then an exec to extract
it (which depends on the tarball), an exec to configure it (which depends on
the previous exec), and an exec to install it (which depends on the
configuration exec), and a service (which depends on the install exec).

Using names for the exec steps (rather than just the command as the name,
use a custom name and specify the command parameter), you should be able to
overwrite the configuration exec in a sub-class appropriately.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Tue, Oct 18, 2011 at 6:11 PM, Dan White y...@comcast.net wrote:

 Thanks for the opinion.
 I understand your concern, but I have a need to do exactly that.

 Making a long story short, RPM's do not work for this need unless you
 consider a relocatable package
 http://www.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable.html
 and I have seen some serious objections to this particular rpm-extension.

 I need to install multiple instances of a service, some are as simple as
 drop tarball, unroll, run a config script, but at least one needs
 instance-specific parameters compiled into it.

 I want to automate it.  If not puppet, I am open to suggestion, but I have
 a Cobbler/Puppet combo running very nicely (so far) on RHEL5 boxes, and any
 alternative needs to play nice with that environment.

 On Oct 18, 2011, at 5:10 PM, Craig White wrote:

  I've always thought that if you wanted, consistent, repeatable
 methodology for install/remove/upgrade that the native packaging is always
 the way to go and does exactly that with tarballs.
 
  I don't think Puppet is the way to drop tarballs  config  make 
 make install because so many things will break along the way.
 
  Craig
 
  On Oct 18, 2011, at 1:56 PM, Dan White wrote:
 
  RHEL 5, and the packages in question come as tar-balls that have to be
 unrolled into place and then compiled/configured.  Not your simple yum
 install..., sad to say.
 
  - Russell Van Tassell russel...@gmail.com wrote:
  It might be helpful to include the O/S you're asking about, possibly
 with
  the package... sometimes it's a matter of just changing/adding a
  respository. Sometimes it might be a little more involved.
 
 
  On Tue, Oct 18, 2011 at 1:21 PM, Dan White y...@comcast.net wrote:
 
  Are there any exapmples out there that show an intelligent way to do
 this ?
 
  My searches are not turning up anything useful
 
 
  “Sometimes I think the surest sign that intelligent life exists
 elsewhere in the universe is that none of it has tried to contact us.”
  Bill Waterson (Calvin  Hobbes)
 
  --
  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.
 
 
  --
  Craig White ~
 craig.wh...@ttiltd.com
  1.800.869.6908 ~~
 www.ttiassessments.com
 
  Need help communicating between generations at work to achieve your
 desired success? Let us help!
 
  --
  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.



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



Re: [Puppet Users] file server not right directory?

2011-10-12 Thread Nathan Clemons
Try:

  file { /etc/mysql:
 ensure = directory,
 mode = 0755,
 owner = root,
 group = root,
  }

  file { /etc/mysql/my.cnf:
source = puppet:///modules/mysql-server/my.cnf,
owner = mysql, group = mysql,
mode  = 644,
notify = Service[mysql],
require = File[/etc/mysql]
  }

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Wed, Oct 12, 2011 at 2:49 PM, olympus stance olympus.sta...@gmail.comwrote:

 Hi Jacob,

 My init.pp file is a symbolic link to the mysql-server.pp in the classes
 directory. It looks like this:

 ---
 class mysql-server {

   package { mysql-server: ensure = installed }
   package { mysql-client: ensure = installed }
   service { mysql:
  enable = false,
  require = Package[mysql-server],

   }

   file { /etc/mysql/my.cnf:
 source = puppet:///modules/mysql-server/my.cnf,
 owner = mysql, group = mysql,
 mode  = 644,
 notify = Service[mysql],
   }



   exec { run-mysqld:
 path = [/bin, /usr/sbin],
 command = /usr/sbin/mysqld ,
   }

   exec { set-mysql-password:
 path = [/bin, /usr/bin],
 command = mysqladmin -uroot password secret,
   }


   exec { set-nagios-password:
 path = [/bin, /usr/bin],
 command = /usr/bin/mysql -u root  -e \CREATE USER 'nagios'@'%'
 IDENTIFIED BY 'secret';\,
   }


 }
 ---


 It looks like it does indeed try to create the my.cnf file before mysql
 gets installed. How can i rectify that

 Thanks!!


 On Wed, Oct 12, 2011 at 5:37 PM, Jacob Helwig ja...@puppetlabs.comwrote:

 On Wed, 12 Oct 2011 14:33:47 -0700, John Bower wrote:
 
  Hello,
 
  I'm trying to share a file between the client and the server.
 
  On the server the file is located at: /etc/puppet/modules/mysql-server/
  files/my.cnf
 
  the code that references to this file is as follows:
 
file { /etc/mysql/my.cnf:
  source = puppet:///modules/mysql-server/my.cnf,
  owner = mysql, group = mysql,
  mode  = 644,
  notify = Service[mysql],
}
 
  Essentially, I want the client to store the my.cnf file to /etc/mysq/
  my.cnf
 
  However i keep getting this error:
  err: /Stage[main]/Mysql-server/File[/etc/mysql/my.cnf]/ensure: change
  from absent to file failed: Could not set 'file on ensure: No such
  file or directory - /etc/mysql/my.cnf.puppettmp_9888 at /etc/puppet/
  modules/mysql-server/manifests/init.pp:15
 
 
 
  i tried setting  source = puppet:///modules/mysql-server/files/
  my.cnf,
 
 
  But that did not make a difference. Please help.
 

 Does /etc/mysql exist on the client machine?

 --
 Jacob Helwig


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



Re: [Puppet Users]

2011-09-29 Thread Nathan Clemons
*sigh* And how did these spammers know I was so flat-chested?

Seriously, can you guys enlighten us as to what's being done to prevent spam
coming in on the list? It's been pretty prevalent lately. I'm not sure if
Google Groups just doesn't cut it or what, but I'm hoping you guys have some
plans in mind.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Sep 29, 2011 at 7:05 AM, Mark Ardiente mark_k...@yahoo.com wrote:

 http://biggerbras.ca/store/site.php?html50

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



Re: [Puppet Users] fighting packaging

2011-08-12 Thread Nathan Clemons
Isn't there an adminfile option to the package resource that will let you
pass responses as if it were an interactive session? Not sure if it's
supported for the apt provider, but worth looking into if you haven't
already.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Aug 12, 2011 at 9:53 AM, Craig White craig.wh...@ttiltd.com wrote:

 Clearly not a problem caused by puppet but something I can't apparently
 deploy with puppet unless someone has an idea.

 Trying to automate a way to deploy mod_mono for apache

 from CLI, the problem seems obvious...

 apt-get install -y --assume-yes libapache2-mod-mono mono-apache-server
 libmono-firebirdsql1.7-cil

 a massive pile of packages installs and it finally arrives at the truth
 moment:

 Configuration file `/etc/apache2/mods-available/mod_mono.conf'
  == File on system created by you or by a script.
  == File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
Y or I  : install the package maintainer's version
N or O  : keep your currently-installed version
  D : show the differences between the versions
  Z : background this process to examine the situation
  The default action is to keep your current version.
 *** mod_mono.conf (Y/I/N/O/D/Z) [default=N] ?

 So it appears that the same target, mod_mono.conf is being created both by
 script and a file in the package itself and it appears that all of the '-y'
 or '--assume-yes' logic in the command itself will not allow an install to
 progress without an interactive answer to the question - the answer to which
 is essentially meaningless because I can control the file anyway with
 puppet.

 Anyone have an idea how to defeat well intentioned but defective packager
 logic?

 --
 Craig White ~~  craig.wh...@ttiltd.com
 1.800.869.6908 ~~~ www.ttiassessments.com

 Need help communicating between generations at work to achieve your desired
 success? Let us help!

 --
 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] Re: puppet dashboard error 500 when trying to view a report detail

2011-08-08 Thread Nathan Yehle
I get this error too using rpms for puppet installed on SL55 x86_64
puppet-2.6.6-1.el5
puppet-dashboard-1.1.1-1
puppet-server-2.6.6-1.el5


Did you ever fix it?
-Nate

-- 
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/-/-9oVwf7xHFwJ.
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: Managing sudo via puppet using #includedir

2011-08-01 Thread Nathan Clemons
These are the perms we're using for that functionality:

dr-xr-x--- 2 root root 4096 Jul  7 18:09 /etc/sudoers.d

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Mon, Aug 1, 2011 at 2:49 PM, treydock treyd...@gmail.com wrote:

 From the sudoer docs it mentioned making the files in /etc/sudoers.d
 be 440, but what about the folder?  Here's the perms on /etc/sudoers.d

 drwxr-xr-x   2 root root 4096 Jul 26 19:16 .
 drwxr-xr-x. 64 root root 4096 Jul 26 19:16 ..
 -r--r-   1 root root   53 Jul 26 19:16 zabbix-puppet

 - Trey

 On Aug 1, 3:47 pm, Len Rugen lenru...@gmail.com wrote:
  It's working here for RHEL 5  6.  Check the owner and perms of
 sudoers.d,
  that's probably not your problem, but it's the only one we've had.

 --
 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-dashboard delayed workers

2011-07-12 Thread Nathan
Hello

I have just installed puppet dashboard from git.

everything seems to load ok except it seems as though background tasks
are not being run.

According to the code README:

running: # env CPUS=4 RAILS_ENV=production /.../script/delayed_job -p
dashboard -n $CPUS -m start

will start the worker.

however it seems as though it is not running (or if it is how can I check?)

and the back ground task section in the web front end is not decreasing.

the version is 1.1.9

Thanks
Nathan

-- 
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] Re: undefined method error when installing Puppet Dashboard 1.1.1

2011-07-01 Thread Nathan Yehle
I'm stuck at this bug too, SL55 x86_64 ruby-1.8.5-5.el5_4.8, puppet-
dashboard-1.1.1-1
-N

-- 
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] Re: undefined method error when installing Puppet Dashboard 1.1.1

2011-07-01 Thread Nathan Yehle
Fixed by downgrading ruby.

Thanks for depreciating so much functionality ruby team!

I had to create a second virtual machine just to run puppetdash
because its required ruby versions do not seem to work with the
versions we use for our puppetmaster server.

Working config:
 SL55
libselinux-ruby-1.33.4-5.7.el5
ruby-irb-1.8.5-19.el5_6.1
ruby-gems-1.3.1-1.el5
ruby-mysql-2.7.3-1.el5
ruby-augeas-0.4.1-1.el5
rubygems-1.3.1-1.el5
ruby-1.8.5-19.el5_6.1
ruby-rdoc-1.8.5-19.el5_6.1
rubygem-rake-0.8.3-1.el5
ruby-shadow-1.4.1-7.el5
ruby-libs-1.8.5-19.el5_6.1

Non-working:

$ ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]



On Jul 1, 10:56 am, Nathan Yehle zimc...@gmail.com wrote:
 I'm stuck at this bug too, SL55 x86_64 ruby-1.8.5-5.el5_4.8, puppet-
 dashboard-1.1.1-1
 -N

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



Re: [Puppet Users] require = Class

2011-06-30 Thread Nathan Clemons
Are both of the .pp files being imported in site.pp / init.pp?

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 30, 2011 at 5:19 PM, brijesh bridgepa...@gmail.com wrote:

 Hi

 I have been trying to use class dependency and had no luck so far.
 following are the two classes i am trying to use

 [root@puppet]#cat libreoffice.pp

 class libreoffice {

  case $hostname {
  foo: { package { libreoffice: ensure = present, require =
 Class[foo1] } }
 }
 }

 [root@puppet]#cat foo.pp

 class foo1 {
  package { openoffice.org-core:
ensure = absent,
  }
 }

 When i run puppetd on client i get the error message
  Could not retrieve catalog from remote server: Error 400 on SERVER:
 Could not find class foo1 at /etc/puppet/manifests/classes/
 libreoffice.pp:18 on node

 Do i need to do anything else in order to use require = Class?

 Any help would be appreciated

 Thanks

 Brijesh



 Do i need

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



Re: [Puppet Users] Puppet client do-overs

2011-06-30 Thread Nathan Clemons
What problem do you have with puppetstoreconfigclean.rb? The problem I
usually have is that I forget it has to be run as root on the puppetmaster,
I keep thinking I need to run it on the client machine.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 30, 2011 at 9:59 AM, Craig White craig.wh...@ttiltd.com wrote:

 I am pulling in the 'client' intended version of puppet.conf on my
 puppetmaster system - probably because I had a package that required a class
 it shouldn't have and I have fixed that (I think - hard to test) but even
 after killing off all puppetd processes, clearing out
 /var/lib/puppet/client_yaml/* and /var/lib/puppet/state/* and restarting
 puppetd they just seem to reload the specific mod_puppet classes that it
 shouldn't. Perhaps it is a stored config and I've tried running
 puppetstoredconfigclean.rb without any success (user stupidity for not
 knowing what this host file is supposed to look like).

 How can I get a fresh start with a client so it operates only on the
 classes it is configured to use?

 Craig

 --
 Craig White ~~  craig.wh...@ttiltd.com
 1.800.869.6908 ~~~ www.ttiassessments.com

 Need help communicating between generations at work to achieve your desired
 success? Let us help!

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



Re: [Puppet Users] struggling with precedence/declarative language

2011-06-28 Thread Nathan Clemons
Did the error change, at least? If so, can you post the new error?

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Tue, Jun 28, 2011 at 11:23 AM, Craig White craig.wh...@ttiltd.comwrote:


 On Jun 28, 2011, at 11:14 AM, Cosimo Streppone wrote:

  On Tue, 28 Jun 2011 20:01:20 +0200, Craig White craig.wh...@ttiltd.com
 wrote:
 
  The error:
  err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 Invalid parameter mode at
 /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet
 
  class firebird::service {
   exec { Create symlink for /var/fbdata:
 ...
 mode= 755,
 ...
   }
 
  Maybe exec resources, like your Create symlink ...
  do not want a mode parameter?
 
 duh, of course it is irrelevant and I removed it - don't know what I was
 thinking.

 It didn't solve the issue though

 Craig

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



Re: [Puppet Users] Re: Different users within same exec

2011-06-26 Thread Nathan Clemons
I agree with Daniel... if USER 1 is creating FOLDER 1 which is owned by
root... why is COMMAND 1 not being run by the user root?

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Sun, Jun 26, 2011 at 11:01 AM, ssk1287 kulkarni.swar...@gmail.comwrote:

 Consider the following scenario.

 I have a PROCESS 1 triggered by COMMAND 1 which is run by USER 1 that
 creates a folder FOLDER 1 which is owned by the root as it should be
 accessible to all users of the system. Now, before I run COMMAND 1, I
 need to run a command COMMAND 2 that clean ups this FOLDER 1 that was
 created during the previous run so as to have a fresh start. Since
 FOLDER 1 is owned by root, I need to run COMMAND 2 as a root user but
 my COMMAND 1 is run by USER 1.

 On Jun 25, 1:56 pm, Daniel Pittman dan...@puppetlabs.com wrote:
  Nope.  If you feel strongly that there should be, you can drop in a
  feature request or submit a patch, and we would be happy to consider
  it.  Generally, though, it seems like a very strange requirement.  I
  can't imagine why you would need to do those operations as different
  users, although I absolutely believe you when you say that you do.
 
  It would be very helpful, so, if you could explain what the root cause
  of that need is.  :)
 
  Daniel
 
  On Sat, Jun 25, 2011 at 06:54, ssk1287 kulkarni.swar...@gmail.com
 wrote:
   That is exactly what I ended up using. Isn't there a more puppetty
   way of doing this ?
 
   On Jun 24, 5:41 pm, Nathan Clemons nat...@livemocha.com wrote:
   Use su -c cmd user?
   --
   Nathan Clemonshttp://www.livemocha.com
   The worlds largest online language learning communityOn Fri, Jun 24,
 2011 at 3:06 PM, ssk1287 kulkarni.swar...@gmail.com wrote:
I have the following exec in my manifest :
 
exec { some_exec:
   path = [ /bin,/usr/bin,/usr/local/bin ],
   command = EXECUTE COMMAND 1,
   onlyif = EXECUTE COMMAND 2,
   logoutput = on_failure
 }
 
I want that the COMMAND 1 should be executed by USER 1 and
COMMAND 2 should be executed by USER 2. Is there a way to do it
 ?
I tried giving the users parameter, but that seems to apply to
 both
the commands.
 
Thanks in advance,
 
--
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 athttp://
 groups.google.com/group/puppet-users?hl=en.
 
  --
  ⎋ Puppet Labs Developer –http://puppetlabs.com
  ✉ Daniel Pittman dan...@puppetlabs.com
  ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
  ♲ Made with 100 percent post-consumer electrons

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



Re: [Puppet Users] Turn off client autoupdate

2011-06-24 Thread Nathan Clemons
Just disable the puppet agent / puppetd (depending on your version) in
chkconfig / update-rc.d / etc.

Further runs would then be done via ssh, either manually or via a
distributed ssh command like ralsh, pdsh, clusterssh, etc.

This is what we do at Livemocha; we're actually in the process of switching
over to using MCollective to trigger Puppet runs.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 24, 2011 at 1:47 AM, Sergey V. Arlashin sergey...@gmail.comwrote:

 By default puppet node connects to server periodically and looks if
 there is something execute. I'm wondering is it possible to make
 puppet clients not connect to server themselves? So that it would be
 possible to update a node only with puppetrun nodename.

 ---
 WBR, Sergey

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



Re: [Puppet Users] ssh_authorized_key and NIS user

2011-06-24 Thread Nathan Clemons
I'm wondering if the User provider has the capability to look up accounts
via NIS. It's been a long time since I've used NIS, however, so I don't know
if this is the problem for sure.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 24, 2011 at 6:41 AM, Andreas Kuntzagk 
andreas.kuntz...@mdc-berlin.de wrote:

 I'm wondering if my description was not clear enough or nobody knows an
 answer to this. Did I stumble across a bug here and should open a ticket?

 regards, Andreas


 Andreas Kuntzagk wrote:

 Hi,

 I have this resource definition:

 ssh_authorized_key { nagios@login2:
key   = [REDACTED]
   user= nagios,
   type= ssh-dss,
   require = Service['nis'],
 }

 This nagios user comes from NIS, yp.conf and nsswitch.conf are handled by
 puppet and configured before the key. I still get an User does not exist.

 daemon.log:
 ...
 Jun 17 14:00:57 node016 puppet-agent[1109]: 
 (/Stage[main]/All/File[/**localhome/nagios/]/ensure)
 created
 Jun 17 14:12:53 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_
 **key[root@node002]/ensure) created
 Jun 17 14:15:14 node016 puppet-agent[1109]: 
 (/Stage[main]//File[/etc/**idmapd.conf]/content)
 content changed '{md5}**3e94f238294cc61b047e7ae50115df**fc' to '{md5}**
 6d9c69f38eca81ab0f879c2771d5d5**43'
 Jun 17 14:15:14 node016 puppet-agent[1109]: (/Stage[main]//Service[idmapd]
 **/ensure) ensure changed 'stopped' to 'running'
 Jun 17 14:15:14 node016 puppet-agent[1109]: (/Stage[main]//Service[idmapd]
 **) Triggered 'refresh' from 1 events
 Jun 17 14:15:41 node016 puppet-agent[1109]: (/Stage[main]/All/File[/etc/*
 *yp.conf]/ensure) defined content as '{md5}**
 9c23d37f431c0788c212d3c0ab8a48**af'
 Jun 17 14:15:58 node016 puppet-agent[1109]: (/Stage[main]/All/All::Append_
 **if_no_such_line[sudoers_**nagios_smartctl]/Exec[/bin/**echo 'nagios
 ALL=(root) NOPASSWD: /usr/sbin/smartctl'  '/etc/sudoers']/returns)
 executed su
 ccessfully
 Jun 17 14:17:03 node016 puppet-agent[1109]: (/Stage[main]//Package[nis]/*
 *ensure) ensure changed 'purged' to 'latest'
 Jun 17 14:17:39 node016 puppet-agent[1109]: (/Stage[main]/All/File[/etc/*
 *nsswitch.conf]/content) content changed '{md5}**
 295c15c4bdac80e50b37689ef08f35**9c' to '{md5}**
 250a1851aec43bcc5f73e8a01b2141**bd'
 Jun 17 14:17:43 node016 puppet-agent[1109]: (/Stage[main]/All/Service[nis]
 **) Triggered 'refresh' from 4 events
 Jun 17 14:17:50 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_
 **key[nagios@login2]/ensure) created
 Jun 17 14:17:50 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_
 **key[nagios@login2]) Could not evaluate: User 'nagios' does not exist
 Jun 17 14:18:06 node016 puppet-agent[1109]: (/Whit[last]) Dependency
 Ssh_authorized_key[nagios@**login2] has failures: true
 ...

 This is Ubuntu 10.04 with puppet 2.6.8

 regards, Andreas


 --
 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+unsubscribe@**
 googlegroups.com puppet-users%2bunsubscr...@googlegroups.com.
 For more options, visit this group at http://groups.google.com/**
 group/puppet-users?hl=enhttp://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.



Re: [Puppet Users] Turn off client autoupdate

2011-06-24 Thread Nathan Clemons
Under 0.25, we do puppet --onetime --no-daemonize.

I'm not sure if that syntax changed in 2.6.x and above.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 24, 2011 at 7:14 AM, sergey sergey...@gmail.com wrote:

 And how is it possible to connect to puppet client via ssh? I mean I
 usually issue puppetrun nodename and then puppetmaster  connects to puppet
 client on the client node. What should I do in case of ssh connect?

 ---
 WBR, Sergey

 On Jun 24, 2011, at 6:10 PM, Nathan Clemons wrote:

 Just disable the puppet agent / puppetd (depending on your version) in
 chkconfig / update-rc.d / etc.

 Further runs would then be done via ssh, either manually or via a
 distributed ssh command like ralsh, pdsh, clusterssh, etc.

 This is what we do at Livemocha; we're actually in the process of switching
 over to using MCollective to trigger Puppet runs.

 --
 Nathan Clemons
 http://www.livemocha.com
 The worlds largest online language learning community



 On Fri, Jun 24, 2011 at 1:47 AM, Sergey V. Arlashin 
 sergey...@gmail.comwrote:

 By default puppet node connects to server periodically and looks if
 there is something execute. I'm wondering is it possible to make
 puppet clients not connect to server themselves? So that it would be
 possible to update a node only with puppetrun nodename.

 ---
 WBR, Sergey

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


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



Re: [Puppet Users] Enable yum repositories as needed

2011-06-24 Thread Nathan Clemons
There's an open bug concerning this very issue, in regards to being able to
specify which repos to use when installing an rpm using the package
resource.

http://projects.puppetlabs.com/issues/2247

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 24, 2011 at 12:27 PM, Craig White craig.wh...@ttiltd.comwrote:


 On Jun 24, 2011, at 11:48 AM, James A. Peltier wrote:

  Hi All,
 
  I'm new to puppet and I'm having some difficulty enabling and disabling
 yum repositories on an as needed basis and I was wondering if you all might
 be able to provide me with some assistance.  I've been able to get puppet to
 configure a yum repository, I'm going to use EPEL as an example here but I'd
 like it for all, by creating a class called epel.pp containing
 
  class epel {
   yumrepo { epel: descr = Extra Packages for Enterprise Linux
 \$releasever - \$basearch, baseurl = 
 http://mirror.its.sfu.ca/mirror/CentOS-Third-Party/epel/\$releasever/\$basearch;,
 gpgcheck = 1, gpgkey = 
 http://mirror.its.sfu.ca/mirror/CentOS-Third-Party/epel/RPM-GPG-KEY-EPEL;,
 enabled=0 }
  }
 
  and it does create and populate the /etc/yum.repos.d/epel.repo file with
 this information.  Now I want to be able to install ganglia-gmond
 automatically from this repository but I can't figure out how to enable and
 disable the repo afterwards?  Can anyone please provide an example of how
 something like this may be accomplished?
 
 I've been at this for less than a week and primarily concentrating on
 ubuntu, not RHEL/CentOS so take this with a grain of salt

 You have to be careful when installing packages from another repo but
 generally, you just keep the EPEL repo disabled and instead of using the
 built-in package command, you would want to 'exec' something like...

 exec('/usr/bin/yum --enablerepo=epel install -y ganglia-gmond') and I would
 also note that you have to ensure that the rpm-gpg key is installed for the
 epel repo BEFORE that command is executed - I believe you already provided
 the gpg-key URL to us.

 something like this should work (adapt for rpm/yum and note that rpm stores
 keys in /etc/pki/rpm-gpg)...

 class apt {
  package { apt:
ensure = installed,
}
  file{/etc/apt/sources.list:
ensure  = present,
owner   = root,
group   = root,
mode= 0444,
content = template(apt/sources.list.erb),
require = Package[apt],
  }
  exec{/usr/bin/apt-get update:
refreshonly = true,
subscribe   = File[/etc/apt/sources.list],
require = File[/etc/apt/sources.list],
  }
  # MongoDB Key
  apt::key { 7F0CEB10:
keyid  = 7F0CEB10,
ensure = present,
  }
 }
 define apt::key($keyid, $ensure, $keyserver = keyserver.ubuntu.com) {
  case $ensure {
present: {
  exec { Import $keyid to apt keystore:
path= /bin:/usr/bin,
environment = HOME=/root,
command = gpg --keyserver $keyserver --recv-keys $keyid  gpg
 --export --armor $keyid | apt-key add -,
user= root,
group   = root,
unless  = apt-key list | grep $keyid,
logoutput   = on_failure,
  }
}
absent:  {
  exec { Remove $keyid from apt keystore:
path= /bin:/usr/bin,
environment = HOME=/root,
command = apt-key del $keyid,
user= root,
group   = root,
onlyif  = apt-key list | grep $keyid,
  }
}
default: {
  fail Invalid 'ensure' value '$ensure' for apt::key
 }
  }
 }

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



Re: [Puppet Users] Different users within same exec

2011-06-24 Thread Nathan Clemons
Use su -c cmd user?
--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 24, 2011 at 3:06 PM, ssk1287 kulkarni.swar...@gmail.com wrote:

 I have the following exec in my manifest :

 exec { some_exec:
path = [ /bin,/usr/bin,/usr/local/bin ],
command = EXECUTE COMMAND 1,
onlyif = EXECUTE COMMAND 2,
logoutput = on_failure
  }

 I want that the COMMAND 1 should be executed by USER 1 and
 COMMAND 2 should be executed by USER 2. Is there a way to do it ?
 I tried giving the users parameter, but that seems to apply to both
 the commands.

 Thanks in advance,

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



Re: [Puppet Users] Questions for puppet 2.6.8 client certificate management

2011-06-17 Thread Nathan Clemons
I could be wrong, as I'm still on 0.25 myself, but I think you want the
--waitforcert seconds option.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 17, 2011 at 5:49 AM, TJ Yang tjyang2...@gmail.com wrote:

 How do I initiate a certificate request without going into non-daemon mode
 ?

 According to Pro Puppet book, so far the only way I know that can
 trigger a certficate request with puppet master is like this

  puppet agent --server=puppetmaster.test.com --no-daemonize --verbose

 but doing so will break my intention of automation I need to create a
 puppet client package. A control-C is needed to terminate the process.
 I have puppetmaster configured to be auto grant and sign certificate
 requests. and I like puppet client can auto issue a request which will
 be granted and start itself up when running
 /etc/init.d/puppetagent268  start


 Is there a command  puppet cert --clean puppetagent1.test.com for
 puppet agent ?
 For now I have to go into $ssldir subdirectory to manually cleanup
 existing certificate.

 --
 T.J. Yang

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



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-17 Thread Nathan Clemons
Simple question, but does wordpress.tar.gz exist in /var/www/ ?

I would expect that you would want your tar exec to depend on whatever is
deploying the wordpress tar.gz file (another Exec or a File resource), so
that you know it's there before you try to use it.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 17, 2011 at 6:14 AM, lucas.brig...@ymail.com 
grillobri...@gmail.com wrote:

 Hi!

 I'm doing a module for the puppet for WordPress will implement.

 I'm having problems with this line:

 exec { tar -vzxf ${downdir}wordpress.tar.gz:
 path =
 [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin],
 }


 And the error generated is this:

 err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf
 /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar
 -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at
 /etc/puppet/modules/wordpress/manifests/install.pp:40



 Can anyone help me?





 --
 Lucas Pereira Brígida
 www.codebroken.wordpress.com

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



Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Nathan Clemons
You want:

file { blah:
  ...
}
exec {blah2:
  ...
  require = File['blah']
}

That way you ensure the file is created before you try to run the exec.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 17, 2011 at 10:43 AM, Annie Rana annier...@gmail.com wrote:

 Hi,

 Thanks much for help. Some how I managed to execute the original shell
 script using command in exec command='sh /tmp/QoS/QoS.sh' and I used path
 parameter as well path='/sbin:/sbin/ipatbles:/bin:/usr/bin' but I have to
 run file and exec recipes separately one after another otherwise exec is
 executed first if both are placed in one recipe and causing file not found
 error. Is there any way to define the sequence of execution?

 Regards,

 Annie


 On Fri, Jun 17, 2011 at 4:50 PM, Luke Bigum luke.bi...@lmax.com wrote:

 Wouldn't have worked anyway, change print to echo and I forgot #!/
 bin/bash... That's what I get for writing code from memory ;)

 That's strange, I just put this in my Puppet server:

 node 'puppetmaster' {
   file { '/etc/shell_file':
ensure = present,
owner = 'root',
group = 'root',
mode = '0755',
 source = 'puppet:///modules/puppet/shell_file',
   }

  exec { '/etc/shell_file': require = File['/etc/shell_file'] }
 }

 [root@co1puppet01 live]# cat ../../modules/live/puppet/files/
 shell_file
 #!/bin/bash
 export LAN=eth1
 export WAN=eth0

 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match
 ip tos 0x880xff classid 1:12
 OUT=$($CMD)
 RET=$?
 echo Command '$CMD' returned $RET 21  /tmp/QoS.out
 echo Command '$CMD' output '$OUT' 21  /tmp/QoS.out

 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport
 2345 -j TOS --set-tos 0x28
 OUT=$($CMD)
 RET=$?
 echo Command '$CMD' returned $RET 21  /tmp/QoS.out
 echo Command '$CMD' output '$OUT' 21  /tmp/QoS.out

 CMD=iptables-save
 OUT=$($CMD)
 RET=$?
 echo Command '$CMD' returned $RET 21  /tmp/QoS.out
 echo Command '$CMD' output '$OUT' 21  /tmp/QoS.out

 [root@puppetmaster live]# puppetd --test
 info: Caching catalog for puppetmaster
 info: Applying configuration version '1308324915'
 notice: /Stage[main]//Node[puppetmaster]/Exec[/etc/shell_file]/
 returns: executed successfully
 notice: Finished catalog run in 1.04 seconds

 [root@puppetmaster]# cat /tmp/QoS.out
 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32
 match ip tos 0x880xff classid 1:12' returned 1
 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32
 match ip tos 0x880xff classid 1:12' output ''
 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport
 2345 -j TOS --set-tos 0x28' returned 2
 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport
 2345 -j TOS --set-tos 0x28' output ''
 Command 'iptables-save' returned 0
 Command 'iptables-save' output '# Generated by iptables-save v1.3.5 on
 Fri Jun 17 15:48:48 2011
 *mangle
 :PREROUTING ACCEPT [3642:790381]
 :INPUT ACCEPT [2591:636935]
 :FORWARD ACCEPT [0:0]
 :OUTPUT ACCEPT [2551:866979]
 :POSTROUTING ACCEPT [2551:866979]
 COMMIT
 # Completed on Fri Jun 17 15:48:48 2011
 # Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011
 *filter
 :INPUT ACCEPT [2637:639987]
 :FORWARD ACCEPT [0:0]
 :OUTPUT ACCEPT [2588:875945]
 COMMIT
 # Completed on Fri Jun 17 15:48:48 2011'

 I'm running out of ideas. You don't have noexec on /tmp do you? No,
 you said you could run it as root... Anyone else?

 On Jun 17, 4:31 pm, Annie Rana annier...@gmail.com wrote:
  Hi Luke,
 
  I replaced my shell script with the one you wrote. Same old error
 message
  appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned
 1
  instead of o at /etc/puppet/manifests/site.pp'
  . Your script didn't generate any log at client machine. Now I am sure
 about
  one thing that there is no issue with the shell script itself. The exec
  command is having hiccup even before executing the shell. I even tried
  command paremeter in exec but no use. Do you know anyother way to
 execute
  bash shell in puppet?
 
  Thanks much,
 
  Annie
 
  On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com
 wrote:
   Hi Luke,
 
   I replaced my shell script with the one you wrote. Same old error
 message
   appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh
 returned 1
   instead of o at /etc/puppet/manifests/site.pp'. Your script didn't
 generated
   any log at client machine. Now I am sure about one thing that there is
 no
   issue with the shell script itself. The exec command is having hiccup
 even
   before executing the shell. I even tried command paremeter in exec but
 no
   use. Do you know anyother way to execute bash shell in puppet?
 
   Thanks much,
 
   Annie
 
   On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com
 wrote:
 
   I'm out of ideas and I'd resort to hacking the script a bit to get
   some debugging output. Try just this in QoS.sh to try identify what's
   failing:
 
   export

Re: [Puppet Users] puppet CA expired

2011-06-16 Thread Nathan Clemons
What's the length of time on the CA cert?

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 16, 2011 at 10:40 AM, Jacob Helwig ja...@puppetlabs.com wrote:

 On Tue, 14 Jun 2011 17:01:20 +0200, j...@squirk.org wrote:
 
  hi,
 
my puppet CA expired. Anyone knows how to solve the problem and extend
  the validity of the CA ? I mean without recreating one and going on each
  node to change the certs (that is what puppet is made to prevent, going
  to each node ^^)
 
 
  regards,
  Jean.
 

 Pretty sure you can't actually extend the validity of the CA cert.

 Unfortunately, I don't think there's much that can be done at this point
 without touching each node.

 I did open up #7962[1] so we can work out exactly what the safety net
 should look like to help prevent this from happening to other people.

 [1] http://projects.puppetlabs.com/issues/7962

 --
 Jacob Helwig

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)

 iQGcBAEBAgAGBQJN+kAOAAoJEHJabXWGiqEBAQ8L/RVhorA/f49gilPW26X82BID
 aGYWFajNg5oBI1OtrieA9J//qNe9HRUUy8xWhq+S+B69FoQ4hU6ocfTH1eXDB8BN
 NM1rwuuqLpTvn1Gguxs3qTMPNyUEqMwugesH1XE7MOUH7XE10SgWqZwBpVpiJBPe
 cMctwUbgN6CfLD1F+wWKfuv9n1L4NvS5AcXj2WjgHbAjAAZx50m3gGIni5U6gF4+
 GTRRxABtAEv0atsvUUO8kxecBhR1N+ZCbQAhk5PcJnKD5CW+7vqxxoC+K0D7BZNZ
 bRKk69IyG/ZFZnMbnzPNdYY2Ol9HE4ClnyydUq7r4uNdG5DbLg5sCPSgZXgAJRzt
 l5N3k4uNSWmnRco5zFmRAxV7YfzSu6o8ZueC07yiu8EeGDpEVWPg29esqUSm7Uqw
 47s2uENGJ2mRr/NfN96YsMjPm2+leKUa37/YcQTdfswdQdkCNGyt/kt5fmncSnYX
 n2DwQ1CmHNQp1gf3wUzSqsIJmlEBKfgSQnTbIyAHBQ==
 =oopZ
 -END PGP SIGNATURE-



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



Re: [Puppet Users] puppet CA expired

2011-06-16 Thread Nathan Clemons
Thanks. I think having to go out across the board once every 5 years is
quite acceptable, although advance warning from the master that it's going
to happen would definitely be a good thing.

Jean: Kudos to running Puppet for 5 years! :)

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 16, 2011 at 11:09 AM, Jacob Helwig ja...@puppetlabs.com wrote:

 5 years, IIRC.

 --
 Jacob Helwig

 On Thu, 16 Jun 2011 11:03:49 -0700, Nathan Clemons wrote:
 
  What's the length of time on the CA cert?
 
  On Thu, Jun 16, 2011 at 10:40 AM, Jacob Helwig ja...@puppetlabs.com
 wrote:
 
   On Tue, 14 Jun 2011 17:01:20 +0200, j...@squirk.org wrote:
   
hi,
   
  my puppet CA expired. Anyone knows how to solve the problem and
 extend
the validity of the CA ? I mean without recreating one and going on
 each
node to change the certs (that is what puppet is made to prevent,
 going
to each node ^^)
   
  
   Pretty sure you can't actually extend the validity of the CA cert.
  
   Unfortunately, I don't think there's much that can be done at this
 point
   without touching each node.
  
   I did open up #7962[1] so we can work out exactly what the safety net
   should look like to help prevent this from happening to other people.
  
   [1] http://projects.puppetlabs.com/issues/7962
  

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)

 iQGcBAEBAgAGBQJN+kbcAAoJEHJabXWGiqEBIgAL/0RX6X/eUll4EZCCZWWaEdby
 +fL9LQvyEPV/IiKeafpbn3Kct3FKIFEgMWOH7xubgp0x36u7jMCmDh4MXiFGOEPL
 BzNyLxPhkTQPG6Ml44INaiQ6wshdIlqFe3HfjtxlQZP/CSVBbPMBIcVwpgaAA6n8
 sJidtfSYPfltbaRB2XMKpIg+ltMG4SEJvCndPBumPZjbrOKsOd4HHcL4MGdp7ump
 ryPj2E9+PXFZ/TZ+oNPSn30v0fX1om/UCHqUelkr6/SJls9P68VWsM7hVIB5Jc4P
 3MwhBWHOzKV+8C7KZsQcUW3qywRCIF3Rb/APM8Ikol7A/fMYQJYvD5QgeVBygoPx
 jwoPoIZAVaxuCXMyOvvaPegsoc0qAk09RlYQXX8EhzwM7NyiatTVojQCZTfecEnO
 diDRs5U/rpjZ2gxrMIGkJMImRKGIDl9e7D+ez1IwY0XyR6b2vYbroeKP8PTG/L/C
 PU6U6MQnzLQ6Eovl+JOifRVZA3+U1nCxNK3ErAopvw==
 =mnf2
 -END PGP SIGNATURE-



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



Re: [Puppet Users] functions and environments

2011-06-16 Thread Nathan Clemons
Or what you might want to do is to create a specific common directory for
code that should be shared, and per-environment directories which contain
code that should not be shared. If you find that something should no longer
be common, you then move it into the per-env directories as appropriate.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 16, 2011 at 12:42 PM, Aaron Grewell aaron.grew...@gmail.comwrote:

 If you want your environments to never be able to affect one another then
 your module paths should not contain any common directories.


 On Thu, Jun 16, 2011 at 12:33 PM, Gabriel Filion lelu...@gmail.comwrote:

 I got further into the problem thanks to your help.. but there's
 something else now.

 On 11-06-15 12:36 PM, Nigel Kersten wrote:
   Functions get executed master side, so even though they get
  delivered to
   the node, they need to be accessible on the master.
 
  oh, ok.. so I'd need to have that new plugin used by the master
 first?
 
   What version of Puppet are you running on the master and nodes?
 
  master: 0.25.4
  node: 0.25.4
 
 
  Ah. For that version, you'll need to make sure the function is in the
  libdir of the puppet master, as I believe that functions from
  environments weren't accessible to the master in 0.25.x

 that seems to have worked. I copied the files in the master's lib dir
 and it got further. However, I'm now stuck on another weirdness between
 environments:

 I get an error about some resource that gets redefined between the
 init.pp from the production environment and another manifest from the
 development environment called moduledir.pp

 in the puppet master's config I have:

 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 rundir=/var/run/puppet
 ssldir=/var/lib/puppet/ssl
 environment=production

 [...]

 [development]

 modulepath=/etc/puppet/modules-development:/etc/puppet/modules:/usr/share/puppet/modules


 I was expecting the declaration in the [development] section to mean
 that if modules are found in the first directory, then the other dirs
 are not inspected.. But apparently this is not the case.

 This could lead to some nasty bugs when testing things out with such a
 mixed environment.
 Is there a work around to make the other module of the same name in the
 /etc/puppet/modules directory not influence the development environment?

 --
 Gabriel Filion

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


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



Re: [Puppet Users] array in template

2011-06-15 Thread Nathan Clemons
Do you have any machines which show the 32-bit machines as i686? I know at
least 32-bit Ubuntu will use that:

nathan@vervain:~$ arch
i686
nathan@vervain:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION=Ubuntu 10.04.2 LTS
nathan@vervain:~$

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Wed, Jun 15, 2011 at 5:35 AM, romuald FREBAULT kurgan...@gmail.comwrote:

 thanks for your answer, i finally wrote

 % if architecture == i386 %
 stuff
 %else%
 stuff
 %end%


 2011/6/14 Ken Barber k...@puppetlabs.com

 Try:

 % if [x86_64,amd64].include?(architecture) %
 ... do stuff ...
 % end %

 ken.

 On Tue, Jun 14, 2011 at 11:30 AM, romuald FREBAULT kurgan...@gmail.com
 wrote:
  Hi,
 
  I have a recipe that deploy a nrpe_local.cfg.
  In my template, i want to deploy diffrent lines between 32 and 64 bits.
 
  We have hosts uder redhat and debian,.
  When i write % if architecture == i386 -%
  no problem, the lines are well deployed on redhat and debian, but for
 the 64
  bits, redhat call the architecture x86_64 and debian amd64...
  i tried to make an array like this
  % if architecture == x86_64, amd64 -%
  or like this
  % if architecture == x86_64, amd64 -%
  or
  % if architecture == x86_64 | amd64 -%
 
  and many other tries, but i couldn't get it to work...
 
  does anyone knows how i could solve my problem?
 
  --
  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.


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



Re: [Puppet Users] puppet clients

2011-06-14 Thread Nathan Clemons
I will also mention that there are now a few books on Puppet. I'm currently
reading through Pro Puppet by James Turnbull (who wrote the original Pulling
Strings with Puppet book), and it's quite good. The original book was a bit
light on some details, Pro Puppet really dives in and shows how all the
pieces fit together.

http://www.apress.com/catalogsearch/result/?q=puppetsubmit=Go

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Tue, Jun 14, 2011 at 10:02 AM, Craig White craig.wh...@ttiltd.comwrote:


 On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote:

  The error message says:
 
  err: Could not parse for environment production: Syntax error at '.';
 expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 
  and your file in question:
 
  # cat nodes.pp
   node 'ubuntu.ttinet' {
 include ntp.
   }
 
 
  So what's on line 2? a . at the end, and the error tells you it did not
 expect the ..
 
  Did you remove the .?
 
  --
  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.
 

 
 the period was indeed a typo but I had to remove the ',' (comma) as well to
 make it work. It finally worked! I guess you always need the commas except
 when they toss you errors.

 I'm sure I will have more questions but I will exhaust Google and the
 documentation first. I've been able to install packages now and see somewhat
 where this is leading.

 Thanks all

 Craig

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



Re: [Puppet Users] Creating Users and Hashing it's password.

2011-06-08 Thread Nathan Clemons
What I do is set the password on one host, and then copy the hash out of
/etc/shadow into the Puppet definition to be set on the other hosts.

By default the Puppet providers expect that the password field will be
hashed as used on the system, not plaintext.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Wed, Jun 8, 2011 at 12:08 PM, vella1tj vella...@gmail.com wrote:

 Hi everyone I would like to first of all say thanks to anyone willing
 to help me.

 I was tasked with creating a Admin account using puppet to push to all
 of our Macs that we have deployed around the Campus.

 user {'sysop':
#uid   = 500,
#groups  = 'admin',
comment= 'Sysop',
ensure= present,
home  = '/home/sysop',
shell   = '/bin/bash',
managehome  = true,
password= 'Haven't figured out the best way to hash
 a password and put it in here.,
}

 That's what I have so far, I don't believe I understand how Hash works
 completely. The way I understand it is it will have a hash in the
 password field and it will compare it to other hashes to match what
 the password would be. So what I was hoping to get help on (or
 anything i've done wrong or you would recommend me doing different) is
 how do i set a resource for the hash do i put it in my files directory
 and then point it to there is there anything special I have to do
 so puppet understands that it's hash.

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



Re: [Puppet Users] backup files whith bad arborescence

2011-06-03 Thread Nathan Clemons
I think this is done because file systems can bog down with too many files
(or directories) inside one directory. By breaking down the hierarchy like
they do, they help keep performance optimal.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Fri, Jun 3, 2011 at 1:01 AM, florian grandjean.flor...@gmail.com wrote:

 Hello,
 I want to say if it's regular when i backup config file with
 filebucket, the save create more folder.

 Example :
 root@client:~# tree /var/testBackup/
 /var/testBackup/
 ├── 0
 │   └── 9
 │   └── 6
 │   └── 9
 │   └── 3
 │   └── f
 │   └── f
 │   └── d
 │   └── 09693ffd352436e900afd719c5a5a8b3
 │   ├── contents
 │   └── paths
 ├── 2
 │   └── 5
 │   └── 5
 │   └── f
 │   └── 3
 │   └── c
 │   └── 2
 │   └── e
 │   └── 255f3c2e42515586e807f1a39ae58cf2
 │   ├── contents
 │   └── paths

 It's possible to create this tree ?

 /var/testBackup/
 ├── 255f3c2e42515586e807f1a39ae58cf2
 │   └── contents
 │   └── paths


 Thanks

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



Re: [Puppet Users] How do I enable repositories and install packages

2011-06-01 Thread Nathan Clemons
The package resource type will allow you to install packages via Yum, but
does not (last I checked) support specifying repos to enable/disable (which
I'd dearly love if it was added).

Which means you either get to write your own extension to package to add
that functionality, or use exec.

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Wed, Jun 1, 2011 at 9:19 AM, hyzhang hyzh...@jcvi.org wrote:

 Hi,

 My shell script is as below. How do I translate them to puppet
 language? I think I can use exec directly. But is there a better way?

 /usr/bin/yum clean all
 /bin/echo -e \n/usr/bin/yum -y --enablerepo=base,rpmforge install
 mplayer mplayer-skins
 /usr/bin/yum -y --enablerepo=base,rpmforge install mplayer mplayer-
 skins

 /usr/bin/yum clean all
 /bin/echo -e \n/usr/bin/yum -y --nogpgcheck install RealPlayer
 AdobeReader_enu flash-plugin
 /usr/bin/yum -y --nogpgcheck install RealPlayer AdobeReader_enu flash-
 plugin

 /usr/bin/yum clean all
 /bin/echo -e \n/usr/bin/yum -y --enablerepo=base install pidgin
 /usr/bin/yum -y --enablerepo=base install pidgin

 Thanks,
 -Haiyan

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



  1   2   >