Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Pietro Monteiro

On 06/03/2011 10:04 AM, Douglas Garstang wrote:
What if the file doesn't exist at all on the other distro? I know for 
example that centos creates a symlink from /boot/grub/grub.conf to 
/etc/grub.conf. What if I only wanted to manage this file for CentOS, 
and for other distro's, do nothing ?


Doug.


if $operatingsystem == 'centos' {
  file { '/etc/grub.conf':
.
  }
}

is one possible solution

--
Pietro Monteiro
Senior Developer
DECK Monitoring
115 W 8th Ave. Eugene, Oregon 97401
Office: 541-343-0110
www.deckmonitoring.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.



Re: [Puppet Users] Re: Is this a valid statement?

2011-04-28 Thread Pietro Monteiro

On 04/28/2011 01:01 PM, Roberto Bouza wrote:

That is the problem. :-)

If its false/true I need to do stuff like

if $enabled != undef {
  class { 'doit': enabled =  $enabled } # This here will use true or
false to delete or add files for example
}


then try:

if $foo == true or $foo == false {
  class { 'doit': enabled = $enabled }
}

or:
case $foo {
  true,false: { class { 'doit': enabled = $enabled } }
}

--
Pietro Monteiro
Senior Developer
DECK Monitoring
115 W 8th Ave. Eugene, Oregon 97401
Office: 541-343-0110
www.deckmonitoring.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.



Re: [Puppet Users] How to write to user's crontab in domain environment?

2011-04-08 Thread Pietro Monteiro

On 04/08/2011 04:23 AM, Max Kamensky wrote:

As far as I understand smth is wrong with syntax in cron user =
$username,


What is $username? A facter, a variable you've set up? Did you try 
adding something like 'notify{username: ${username:}' and manually 
running the puppet agent to verify if $username is being correctly set?


--
Pietro Monteiro
Senior Developer
DECK Monitoring
115 W 8th Ave. Eugene, Oregon 97401
Office: 541-343-0110
www.deckmonitoring.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.