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' :
ens
t.
>
> You'll still have a problem if the jdk package is updated by puppet,
> however. In that case the fact would have the old version and try to ensure
> that the link points to a non-existent target. Maybe there's a way to make
> the exec work in that case, with a refresho
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 in
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 /usr/java/jd
:25 AM, Ellison Marks 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 de
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 t
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' => "${module_name}/ibm.inittab.e
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: {
fa
2013 at 11:15 AM, Greg Coit wrote:
> Thank you for the reply Frederiko. Unfortunately, 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',
ly. Machines in dc1 get 1.2.3.1,
> dc2 gets 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
>
&
...
> }
> }
>
> Then your hieradata would set
>
> in a.b.c.d.yaml:
> 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
&
ually
change the modules. Isn't it desirable to have these out of the
modulespath? I don't see why we have to do this way 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:
>
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 cod
installation. I wonder if I
missed something.
Any other idea?
thanks,
-fred
On Mon, Aug 29, 2011 at 7:27 AM, jcbollinger wrote:
>
>
> On Aug 26, 1:26 pm, Frederiko Costa wrote:
> > Hi folks,
> >
> > The question I have is regarding to Service resource on Red Ha
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
selinux](provider=augeas): Closed the augeas connection
thanks for the help!
-fred
On Fri, Aug 26, 2011 at 8:42 AM, Frederiko Costa wrote:
> I tried both suggestions: egrep and adding the -e switch on sed, but none
> worked. I'm going to try augeas ...
>
> -fred
>
>
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 sys
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 wrote:
> > Hi folks,
> >
> > I have the following resource on my test environ:
> >
> > exec { "/bin/sed -i 's/^SELINUX=enforcing/S
; On Fri, Aug 26, 2011 at 8:25 AM, Frederiko Costa wrote:
>
>> 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
>
--in-place[=SUFFIX]
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 wrote:
> On 08/26/2011 11:03 AM, Frederiko C
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
in environment 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:37P
lopment]
> > modulepath = /etc/puppet/environments/development/modules
> >
> > Thanks
> >
> > On Aug 12, 2:39 pm, Frederiko Costa wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello everyone,
> >
> > > I h
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
factpath=$vardir/
24 matches
Mail list logo