Re: [Puppet Users] symlink creation using facter, but facter is nil at first run.

2013-09-25 Thread Frederiko Costa
work in that case, with a refreshonly or something, but I can't quite think of it right now, because ln -s will fail if the link already exists (even if it's pointing to a target that no longer exists). Chris On Fri, Sep 20, 2013 at 9:30 PM, Frederiko Costa freder...@gmail.comwrote: Hi all

Re: [Puppet Users] What's the best practice to manage software updates using puppet ?

2013-09-25 Thread Frederiko Costa
What I particularly do is to make sure that every module has the $package_ensure class parameter set to 'present' by default. If I want a particular version, then I tell when I instantiate the class. One example would be: class a($package_ensure = 'present') { package { 'whatever-a' :

Re: [Puppet Users] Scoping issue?

2013-09-21 Thread Frederiko Costa
Hi, I believe it could be this way: define ssh_user($passwd, $key) { user { $name: ensure = present, managehome = true, password = $passwd ? { /\w+/ = $passwd, default = undef, } } I think you should also double check the class with a define

Re: [Puppet Users] Re: Facter value at Catalog compilation

2013-09-20 Thread Frederiko Costa
:25 AM, Ellison Marks gty...@gmail.com wrote: Post the code for the custom fact? On Thursday, September 19, 2013 2:23:15 PM UTC-7, Frederiko Costa wrote: Hi, I've got a facter shipped with a custom module. This factor returns the version of a determined package. It returns nil

[Puppet Users] symlink creation using facter, but facter is nil at first run.

2013-09-20 Thread Frederiko Costa
Hi all, I'm trying to find a better way to implement this, but I can't think of. I have a jdk module that requires to create a symlink to whatever version is the one installed. Say I install jdk-6u35, it will create something like /usr/java/jdk_1.6.35. I would like to create a symlink

[Puppet Users] Facter value at Catalog compilation

2013-09-19 Thread Frederiko Costa
Hi, I've got a facter shipped with a custom module. This factor returns the version of a determined package. It returns nil if the package is not installed yet. When running for the first time, assuming the package is not installed, the facter will be still nil. When referring to that facter in

Re: [Puppet Users] basic case statement question

2013-09-05 Thread Frederiko Costa
, that doesn't seem to be the issue. The following is from the pupetlabs/ntep docs and works: class { '::ntp': servers = [ '0.us.pool.ntp.org', '1.us.pool.ntp.org', ' 2.us.pool.ntp.org', '3.us.pool.ntp.org'], } Greg On Thursday, September 5, 2013 10:41:25 AM UTC-7, Frederiko Costa wrote

Re: [Puppet Users] basic case statement question

2013-09-05 Thread Frederiko Costa
Hi, To me, this would look like this. You're assigning the 'server' variable using =, rather than =: class { '::ntp': case $timezone { 'PDT': { servers = [ '0.us.pool.ntp.org', '1.us.pool.ntp.org', ' 2.us.pool.ntp.org', '3.us.pool.ntp.org'] } default: {

Re: [Puppet Users] if then statement within file resource

2013-09-05 Thread Frederiko Costa
Hi, I believe in that case you should use selectors to make it work. http://docs.puppetlabs.com/puppet/2.7/reference/lang_conditional.html#selectors Or you can use the 'if' outside the file resource. Something like this: $template_name = $manufacter ? { 'ibm' =

Re: [Puppet Users] Roles/profiles and hiera

2013-09-04 Thread Frederiko Costa
1.4.5.1, and any machine gets 1.1.1.1. In summary we move data into Hiera and replace module::someclass::dc with a simple module that does a lookup to a data file based on facts that have classified the node. Ramin On 9/3/2013 8:49 AM, Frederiko Costa wrote: Excellent.. thanks! And now sorry

Re: [Puppet Users] Roles/profiles and hiera

2013-09-03 Thread Frederiko Costa
if are trying to abstract things and avoiding touching modules whenever we can. Thanks in advance. On Friday, August 30, 2013 4:09:39 PM UTC-7, Ramin K wrote: On 8/30/2013 3:48 PM, Frederiko Costa wrote: Hi everyone, Do you guys know any article/doc talking about the use of roles/profiles

Re: [Puppet Users] Roles/profiles and hiera

2013-09-03 Thread Frederiko Costa
: profile::zabbix20::server::bind_ip: 1.2.2.3 in x.y.z.w.yaml: profile::zabbix20::server::bind_ip: 1.2.3.4 That way you have a single profile for all datacenters. - Chad On Tue, Sep 3, 2013 at 11:49 AM, Frederiko Costa freder...@gmail.com wrote: Excellent.. thanks! And now sorry

[Puppet Users] Roles/profiles and hiera

2013-08-30 Thread Frederiko Costa
Hi everyone, Do you guys know any article/doc talking about the use of roles/profiles approach with hiera? I'm particularly interested in how to organize the manifests when having multiple data centers, parametized classes and wants to use hiera. Being even more specific, how to organize the

Re: [Puppet Users] Re: Service resource does not turn services off on reboots

2011-08-29 Thread Frederiko Costa
installation. I wonder if I missed something. Any other idea? thanks, -fred On Mon, Aug 29, 2011 at 7:27 AM, jcbollinger john.bollin...@stjude.orgwrote: On Aug 26, 1:26 pm, Frederiko Costa freder...@gmail.com wrote: Hi folks, The question I have is regarding to Service resource on Red

[Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
Hi folks, I have the following resource on my test environ: exec { /bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config: path = [ '/usr/bin', '/bin' ], onlyif = /bin/grep '^SELINUX=enforcing' /etc/sysconfig/selinux 2/dev/null, logoutput = true, } Whenever I run:

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
] edit files in place (makes backup if extension supplied) Frank - I will read about the augeas type. As a newbie in Puppet, it was unknown to me. Thanks, -fred On Fri, Aug 26, 2011 at 8:16 AM, Frank Sweetser f...@wpi.edu wrote: On 08/26/2011 11:03 AM, Frederiko Costa wrote

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
. On Fri, Aug 26, 2011 at 8:25 AM, Frederiko Costa freder...@gmail.comwrote: Hi folks, Thanks for the quick help Aaron - the -i does an in place modification. If I run on the command-line, works fine. If I don't use -i, I would have to use some sort of redirection and replace the original file

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
I tried both suggestions: egrep and adding the -e switch on sed, but none worked. I'm going to try augeas ... -fred On Fri, Aug 26, 2011 at 8:31 AM, Kinzel, David david.kin...@encana.comwrote: Hi folks, I have the following resource on my test environ: exec { /bin/sed -i

[Puppet Users] Service resource does not seem to be disabling service on reboots

2011-08-26 Thread Frederiko Costa
Hi folks, The question I have is regarding to Service resource on Red Hat systems. I have the following: service { [ anacron, atd ]: ensure = stopped, enable = false, hasrestart = true, hasstatus = true, } It runs fine, disabling the service while the system is

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Frederiko Costa
On Fri, Aug 26, 2011 at 8:42 AM, Frederiko Costa freder...@gmail.comwrote: I tried both suggestions: egrep and adding the -e switch on sed, but none worked. I'm going to try augeas ... -fred On Fri, Aug 26, 2011 at 8:31 AM, Kinzel, David david.kin...@encana.comwrote: Hi folks, I

[Puppet Users] Service resource does disable services on reboots

2011-08-26 Thread Frederiko Costa
Hi folks, The question I have is regarding to Service resource on Red Hat systems. I have the following example: service { [ anacron, atd ]: ensure = stopped, enable = false, hasrestart = true, hasstatus = true, } It runs fine, disabling the service while the

Re: [Puppet Users] enviroments are not being used

2011-08-15 Thread Frederiko Costa
development in 0.07 seconds info: Caching node for X notice: Compiled catalog for XX in environment testing in 0.03 seconds thanks, -fred On Sat, Aug 13, 2011 at 1:15 AM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Fri, Aug 12, 2011 at 02:39:37PM -0700, Frederiko Costa wrote

[Puppet Users] enviroments are not being used

2011-08-12 Thread Frederiko Costa
Hello everyone, I have the following environments configured as master: # puppetmasterd -V 0.25.4 # cat puppet.conf [main] confir=/etc/puppet logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet pidfile=$rundir/puppetmasterd.pid

Re: [Puppet Users] Re: enviroments are not being used

2011-08-12 Thread Frederiko Costa
Thanks On Aug 12, 2:39 pm, Frederiko Costa freder...@gmail.com wrote: Hello everyone, I have the following environments configured as master: # puppetmasterd -V 0.25.4 # cat puppet.conf [main] confir=/etc/puppet logdir=/var/log/puppet vardir=/var