[Puppet Users] Re: facter 1.7.1 crashed on sshfp_* facts

2013-06-25 Thread Alexander Grushin
Looks like this is a some problem with ruby/dependencies

[root@ndb2r0 ~]# cat 1.rb
#!/usr/bin/ruby
#
require 'digest/sha1'
require 'base64'
require 'digest/sha2'
puts Digest::SHA256.hexdigest(123)
[root@ndb2r0 ~]# ruby 1.rb
Illegal instruction

But this version looks good:

[root@ndb2r0 ~]# cat 1.rb
#!/usr/bin/ruby
#
#require 'digest/sha1'
require 'base64'
require 'digest/sha2'
puts Digest::SHA256.hexdigest(123)
[root@ndb2r0 ~]# ruby 1.rb
a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3

# ruby -v
ruby 1.8.7 (2012-10-12 patchlevel 371) [x86_64-linux]

-- 
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] Puppet, samba3 and User SID

2013-06-25 Thread Chantal Rosmuller
I have a puppet module that configures samba3 with network shares and adds 
samba users. If the server crashes and I configure a new server with 
puppet, the samba User SID of the users will be different and I suspect all 
users will get another profile on their windows client. I think I will have 
to change this if I want to be able to do a full configuration restore when 
the server crashes. But how do i go about this? Usually the User SID is 
automatically created. Do I let puppet generate one? Did anyone think of a 
smart solution for this?

The same question for the domain sid: 
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html#id2609882

I backup the secrets.tdb and passdb.tdb to solve this problem, but I would 
like to be able to do a full puppet restore.

-- 
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] Separate reporting server for estate subset

2013-06-25 Thread ollies...@googlemail.com
Hello,

Out of a large-ish estate of systems I want only some of those systems to 
send reports elsewhere to be processed by Foreman/Dashboard etc. Whilst the 
others carry on sending their reports to the general puppet master.

Is this possible from the client side using reportserver = option and is 
it possible for Foreman / Dashboard to only process these reports and 
possibly inventory information as well ?

Thanks
Paul

-- 
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] how to run backtick in erb file

2013-06-25 Thread Virtual_user
Hi
I am very new to puppet and wants to implement something like this in my 
puppet template (erb file)

the logic i am trying to do is :

 sssd_count=`rpm -qa | grep 'sssd' | wc -l`

% if  sssd_count =2 -%
session optional  sss.so
% else %
session optional  pam_ldap.so
% end -%

but the backtick does not work.. or i am unable to store the expected value 
in to sssd_count
is there any other way to perform this task ??

I will be really grateful if i can get some help .. 

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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] how to run backtick in erb file

2013-06-25 Thread Ken Barber
 I am very new to puppet and wants to implement something like this in my
 puppet template (erb file)

 the logic i am trying to do is :

  sssd_count=`rpm -qa | grep 'sssd' | wc -l`

 % if  sssd_count =2 -%
 session optional  sss.so
 % else %
 session optional  pam_ldap.so
 % end -%

 but the backtick does not work.. or i am unable to store the expected value
 in to sssd_count
 is there any other way to perform this task ??

You probably want the syntax to look something like:

% sssd_count=`rpm -qa | grep 'sssd' | wc -l` -%

% if  sssd_count =2 -%
session optional  sss.so
% else %
session optional  pam_ldap.so
% end -%

Notice how I've wrapped the variable declaration in % -%. However, I
imagine the real problem here is that templates do not run on the
destination agent, they run on the puppet master - which is probably
why it hasn't been working out for you. So unless you're running in
masterless mode, forget this methodology.

 I will be really grateful if i can get some help ..

A far more efficient way of doing this, is to make your module install
the 'sssd' package for you (could be conditional also). That way
you're not having to detect the state of the package, instead you are
enforcing the state you want.

If you really can't do this, then what you want is to write a fact
that tells you weither the package is installed or not or just a fact
that grabs all packages perhaps, and you later pick the package from a
list. Facts run on the agent very early in the cycle, and their
content is submitted to the master - so can be used in templates like
the one you have created.

ken.

-- 
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] puppet: 3.1.1 - 3.2.1 load increase

2013-06-25 Thread christian . le . flamm
Forgot to enable email notification here. Decided to go back to 3.1.1 a 
week ago. Will upgrade again to provide more specific load information. Thx!

You have to be a little bit more specific. Is load only CPU related, or 
 I/O? Also, what do the log say? 3.2 pushes lots of notices about syntax 
 obsolescence in the logs... 




-- 
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] Creating a deploy manifest for puppet.

2013-06-25 Thread Avi Israeli
Hi all,
I'm testing puppet as my new deployment manager.
I need to create a manifest that does the following on Windows servers:
1. Changes a registry key - I'm using the puppet-registry module
2. Sleeps for an hour - I've been trying to use the sleep module with no 
success
3. Stops a certain service
4. Replaces files on a specific location
5. Changes the registry key from the first step
6. Starts the service
 
I'm a newbie to Puppet and have read the manuals, but I still can't get the 
correct way of doing things (i.e. when I try to double change the registry, 
I get an error that says I can't redeclare the key.)
 
I would appreciate any assistance I may receive here..
 
Great day to all,
Avi Israeli,
DevOps Engineer,
ooVoo

-- 
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] Puppet Enterprise 3.0 now available!

2013-06-25 Thread Nigel Kersten
Hello puppet-users,

Puppet Enterprise 3.0 is now available now. You can download it now here:
http://puppetlabs.com/misc/pe-files/


This major release introduces the following new capabilities:

* Enhanced performance and scalability: 200% performance boost and 100%
increase in scalability helps you move faster and respond more quickly to
changing business needs
* New orchestration capabilities: Dynamically discover resources, then
fully orchestrate complex management operations on large volumes of cloud
nodes using Puppet Enterprise's orchestration engine.
* Software-defined infrastructure: Automate the management of not just
compute resources, but also network and storage resources, with Puppet
Enterprise's unified, software-defined approach

You can get a full overview of all of the new Puppet Enterprise
capabilities here:
https://puppetlabs.com/puppet/whats-new/

Or review the docs here:
https://docs.puppetlabs.com/pe/3.0/

I'm hosting live technical webinars and demo on Thursday, June 27.
Register today: https://puppetlabs.com/resources/webinars/

We hope you enjoy this release, and looking forward to your feedback!


Nigel Kersten
CTO, Puppet Labs
@nigelkersten

-- 
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] Disable certain facter facts?

2013-06-25 Thread Trevor Vaughan
I'm going to heartily +1 this.

Ideally, we would be able to specify only those facts that we know we need
and have the ability to blacklist facts that are harmful to our systems.

Also, custom facts that are removed from the server should be purged from
the clients and server cache at the next run after removal.

Trevor


On Mon, Jun 24, 2013 at 12:59 PM, Roger rojspen...@gmail.com wrote:

 We found out, the hard way, that version 1.7 of Facter adds facts for
 mounted linux file systems.

 This is nice for normal servers.  For a server hosting Oracle not so good.
  We went from about 100 facts per server to well over 3,000 (our Oracle
 boxes have quite a few volumes mounted).

 Of course, this choked our ENC (Foreman) having this many facts pumped
 into it and required us to downgrade Facter to the 1.6 series.

 Is it possible to tell facter to ignore certain facts?  Couldn't find a
 config file for it and not sure how puppet tells it to gather facts.

 Would be useful so we don't have to remain at 1.6.

 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.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
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] Raziel - a partial encrypted Hiera backend

2013-06-25 Thread Felix Frank
Hi,

this does look potentially helpful. Thanks for sharing!

On 06/24/2013 03:26 PM, Jens Braeuer wrote:
 Hi everyone,
 
 In my environment, we heavily rely on Hiera to parametrize our modules.
 Like the Puppet code, I would like to version-control the Hiera .yaml
 files. However committing passwords in plain text to GitHub seems really
 odd.
 
 So I would like to make you aware of one of my side-projects called Raziel.
 https://github.com/jbraeuer/raziel/
 http://bit.ly/raziel-slides
 
 While there is one approach (hiera-gpg), this renders most of the
 version-control features useless, as the whole file is encrypted. With
 Raziel, keys are selectively encrypted, so your .yaml file may read like
 
 ---
 mail.user: automat...@commercetools.de
 mail.password:
 ENC(jA0EAwMCsYQ4Nyhcgx9gySZ1Z5HPMDbSxI9TL11UrSbIxApQNeZ+uMJqwkrTNwKgs4qkD5FDgA==)
 mail.server: smtp.googlemail.com
 
 Encryption is based on GPG via ruby-gpgme. The values itself are
 encrypted symmetric. The symmetric key is encrypted with asymmetric
 crypto, which allows fine grained control over attribute visibility.
 
 Enjoy,
 Jens
 
 

-- 
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] mtime/md5lite with puppet 3.x bug Bug #13199

2013-06-25 Thread Stefan Wiederoder
Hello List,

I´ve tried to switch from md5 checksum to md5lite within all my 
configuration to spare a few cpu cycles on my master,
but it didn´t work at all :-(

Then I´ve found out about bug #13199, but the bugs lists only 2.7x as 
affected.

can anybody confirm this issue on 3.x?

funny that the bug isn´t anywhere on the roadmap at all  I´d suggest to 
remove mtime/md5lite from the
documentation.

it´s not a feature, it´s a bug 

bye
,
Stefan

-- 
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 umask and /etc/sysconfig/init

2013-06-25 Thread Dominic Cleal
On 24/06/13 12:22, David Sandilands wrote:
 We are working on a replacing our current build set by ksh scripts with
 puppet manifests and I'm having some difficulty setting umask in
 /etc/sysconfig/init for RHEL 6
 
 Ideally I would like to just do
 
 augeas { 'augsysconfiginitumask':
context = '/files/etc/sysconfig/init',
changes = set umask 027;
 }
 
 but that just sets a line to umask=027, we use augeas to update this
 file from other places so ideally wouldn't like to use templates.
 
 Any ideas or thoughts?

I don't follow your question.  What did you expect or want it to do?

-- 
Dominic Cleal
Red Hat Engineering

-- 
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] Templates see numbers as strings

2013-06-25 Thread Claudio

Given the manifest:

 $a = 1
 $b = 1 + 0
 $c = 1.1
 $d = 1.1 + 0
 $result = inline_template(
 a %= @a.class % %= @a %
 b %= @b.class % %= @b %
 c %= @c.class % %= @c %
 d %= @d.class % %= @d %
 )
 notify {
 $result:
 }



The output is:

 a String 1
 b Fixnum 1
 c String 1.1
 d Float 1.1



Is this working as intended?

How can I identify number types within the template without adding + 0 on 
the manifest? I'm aware that it's not a good idea to duck-type on templates 
but I'm still wondering.


--
Claudio

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Templates see numbers as strings

2013-06-25 Thread Claudio
I forgot to clarify that this was tested on versions 3.2.1 and 3.2.2.

On Tuesday, June 25, 2013 1:06:21 PM UTC-3, Claudio wrote:


 Given the manifest:

 $a = 1
 $b = 1 + 0
 $c = 1.1
 $d = 1.1 + 0
 $result = inline_template(
 a %= @a.class % %= @a %
 b %= @b.class % %= @b %
 c %= @c.class % %= @c %
 d %= @d.class % %= @d %
 )
 notify {
 $result:
 }



 The output is:

 a String 1
 b Fixnum 1
 c String 1.1
 d Float 1.1



 Is this working as intended?

 How can I identify number types within the template without adding + 0 
 on the manifest? I'm aware that it's not a good idea to duck-type on 
 templates but I'm still wondering.


 --
 Claudio



-- 
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] Disable certain facter facts?

2013-06-25 Thread Patrick Carlisle
 Is it possible to tell facter to ignore certain facts?  Couldn't find a
 config file for it and not sure how puppet tells it to gather facts.


There's no configuration right now. I think you have a pretty reasonable
case, and you should file a feature request at
http://projects.puppetlabs.com/projects/facter.

-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Worker Bee
Hi Everyone;

I was wondering if anyone has created ot knows of a module that can be used
to assign static IP addresses to hosts post build.  The addresses will be
static but, need to be assigned based on MAC address.

Essentially, we have a file with a list of hostnames/mac addresses.  I need
to use puppet to assign the correct IP addrsses to the correct host.
Stored Configs is not an option.

I will be grateful for any advice/feedback!

Thanks!
Bee

-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Dan White
You are describing DHCP reservations . 
That would be something to do with a DHCP server, not necessarily with Puppet 


“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) 

- Original Message -
From: Worker Bee beeworke...@gmail.com 
To: puppet-users@googlegroups.com 
Sent: Tuesday, June 25, 2013 2:06:05 PM 
Subject: [Puppet Users] Dynamically assign Static IP Addresses 






Hi Everyone; 

I was wondering if anyone has created ot knows of a module that can be used to 
assign static IP addresses to hosts post build. The addresses will be static 
but, need to be assigned based on MAC address. 

Essentially, we have a file with a list of hostnames/mac addresses. I need to 
use puppet to assign the correct IP addrsses to the correct host. Stored 
Configs is not an option. 

I will be grateful for any advice/feedback! 

Thanks! 
Bee 


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


-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Worker Bee
Yes, but we will not be able to use DHCP in this case.  This is why I was
aksing if anyone had any suggesting for leveraging Puppet to do this


On Tue, Jun 25, 2013 at 2:30 PM, Dan White y...@comcast.net wrote:

 You are describing DHCP reservations.
 That would be something to do with a DHCP server, not necessarily with
 Puppet

 “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)

 --
 *From: *Worker Bee beeworke...@gmail.com
 *To: *puppet-users@googlegroups.com
 *Sent: *Tuesday, June 25, 2013 2:06:05 PM
 *Subject: *[Puppet Users] Dynamically assign Static IP Addresses


 Hi Everyone;

 I was wondering if anyone has created ot knows of a module that can be
 used to assign static IP addresses to hosts post build.  The addresses will
 be static but, need to be assigned based on MAC address.

 Essentially, we have a file with a list of hostnames/mac addresses.  I
 need to use puppet to assign the correct IP addrsses to the correct host.
 Stored Configs is not an option.

 I will be grateful for any advice/feedback!

 Thanks!
 Bee

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



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




-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Worker Bee
I can think of several ways puppet can do this, I was just wondering if the
group might have any ideas/suggestions as to best approaches.  Obviously,
we are unable to use DHCP in this particular case, or we would.


On Tue, Jun 25, 2013 at 2:30 PM, Dan White y...@comcast.net wrote:

 You are describing DHCP reservations.
 That would be something to do with a DHCP server, not necessarily with
 Puppet

 “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)

 --
 *From: *Worker Bee beeworke...@gmail.com
 *To: *puppet-users@googlegroups.com
 *Sent: *Tuesday, June 25, 2013 2:06:05 PM
 *Subject: *[Puppet Users] Dynamically assign Static IP Addresses


 Hi Everyone;

 I was wondering if anyone has created ot knows of a module that can be
 used to assign static IP addresses to hosts post build.  The addresses will
 be static but, need to be assigned based on MAC address.

 Essentially, we have a file with a list of hostnames/mac addresses.  I
 need to use puppet to assign the correct IP addrsses to the correct host.
 Stored Configs is not an option.

 I will be grateful for any advice/feedback!

 Thanks!
 Bee

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



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




-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Jerald Sheets
Wouldn't you want to do this on the provisioning side?


---
Jerald M. Sheets jr.



On Tue, Jun 25, 2013 at 3:04 PM, Worker Bee beeworke...@gmail.com wrote:

 Yes, but we will not be able to use DHCP in this case.  This is why I was
 aksing if anyone had any suggesting for leveraging Puppet to do this


 On Tue, Jun 25, 2013 at 2:30 PM, Dan White y...@comcast.net wrote:

 You are describing DHCP reservations.
 That would be something to do with a DHCP server, not necessarily with
 Puppet

 “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)

 --
 *From: *Worker Bee beeworke...@gmail.com
 *To: *puppet-users@googlegroups.com
 *Sent: *Tuesday, June 25, 2013 2:06:05 PM
 *Subject: *[Puppet Users] Dynamically assign Static IP Addresses


 Hi Everyone;

 I was wondering if anyone has created ot knows of a module that can be
 used to assign static IP addresses to hosts post build.  The addresses will
 be static but, need to be assigned based on MAC address.

 Essentially, we have a file with a list of hostnames/mac addresses.  I
 need to use puppet to assign the correct IP addrsses to the correct host.
 Stored Configs is not an option.

 I will be grateful for any advice/feedback!

 Thanks!
 Bee

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



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




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




-- 
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] Dynamically assign Static IP Addresses

2013-06-25 Thread Worker Bee
Thanks, Ken.  It will be a secondary interface and it will 'hopefully' be a
one-time fix.

I appreciate the feedback and will take a look at this!

Jerald; you are absolutely right, this should be a provisioning task but,
we I have an OPS team who needs to make a one-tme correction on exisiting
gear.  DHCP is not an option due to limitations in the environment.

Thanks again!

Bee


On Tue, Jun 25, 2013 at 3:27 PM, Ken Barber k...@puppetlabs.com wrote:

 This module from @finch can do networking configuration:
 https://forge.puppetlabs.com/adrien/network ... the mac address of a
 host/interface can be gleaned from facts.

 Is this change going to occur on your primary interface though (the
 one you are talking to your puppetmaster on), or is it for some kind
 of secondary interface?

 On Tue, Jun 25, 2013 at 8:05 PM, Worker Bee beeworke...@gmail.com wrote:
  I can think of several ways puppet can do this, I was just wondering if
 the
  group might have any ideas/suggestions as to best approaches.
  Obviously, we
  are unable to use DHCP in this particular case, or we would.
 
 
  On Tue, Jun 25, 2013 at 2:30 PM, Dan White y...@comcast.net wrote:
 
  You are describing DHCP reservations.
  That would be something to do with a DHCP server, not necessarily with
  Puppet
 
  “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)
 
  
  From: Worker Bee beeworke...@gmail.com
  To: puppet-users@googlegroups.com
  Sent: Tuesday, June 25, 2013 2:06:05 PM
  Subject: [Puppet Users] Dynamically assign Static IP Addresses
 
 
  Hi Everyone;
 
  I was wondering if anyone has created ot knows of a module that can be
  used to assign static IP addresses to hosts post build.  The addresses
 will
  be static but, need to be assigned based on MAC address.
 
  Essentially, we have a file with a list of hostnames/mac addresses.  I
  need to use puppet to assign the correct IP addrsses to the correct
 host.
  Stored Configs is not an option.
 
  I will be grateful for any advice/feedback!
 
  Thanks!
  Bee
 
  --
  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.
 
 
 
  --
  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.
 
 
 
 
  --
  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.
 
 

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




-- 
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] The handy Grail of Modules Standards

2013-06-25 Thread Dan White
I have been watching this thread grow and metastasize and I would like to offer 
my opinions: 

The wonderful thing about standards is that there are so many of them to 
choose from. Grace Hopper (maybe) 

There are at least two very different directions to approach this from, IMHO. 

The first is from the idea to create a universally useable module that can be 
dropped into any puppet master and run without modification. This seems to me 
to be the approach of Example-42. 

The other approach is to provide a set of common sense, best-practice 
guidelines for folks to use to grow their own modules for their own specific 
needs. 

I think both are necessary and valuable. 

My grumble about the Example-42-Swiss-Army-Knife approach is that I would like 
to know what is absolutely necessary and what is optional. I do not want to 
implement the equivalent of the Sears Craftsman Gazillon Piece Tool Warehouse 
when all I need is one lousy Phillip's screwdriver. 

I have dug thru some of the Example 42 modules and I have learned more than a 
few nifty ways of getting things done, but I am working in a 
one-operating-system environment (Red Hat) and I do not need all the extra code 
to cover the other OS's. 

Other grumbles (not only about Example 42) include sparse documentation and 
examples: If you are going to define a pile of parameters, it would be very 
helpful to include examples to show how to use them. Very few published modules 
provide enough detail to make me happy. 

The old saying is There's more than one way to skin a cat. (My apologies to 
all ailurophiles out there, of which I am one) 
Same thing here. Puppet is a potentially powerful framework for system 
configuration and management. If you are sloppy about how you use it, you can 
booger up your systems big-time and lose important data. 

Exactly how to do it all is not as important (IMHO) as learning right and wrong 
ways to do individual tasks. It is then up to the individual DevOp to tailor 
the pieces to fit their particular needs and environment. 

And to use the closing of Dennis Miller, ...of course, that's just my opinion 
. I could be wrong. 

“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 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] The handy Grail of Modules Standards

2013-06-25 Thread Alessandro Franceschi


On Tuesday, June 25, 2013 9:16:20 PM UTC+2, jcbollinger wrote:



 On Monday, June 24, 2013 9:12:17 AM UTC-5, Alessandro Franceschi wrote:



 On Monday, June 24, 2013 3:57:55 PM UTC+2, jcbollinger wrote:


 None of my modules have any parameterized classes, but I am not at 
 liberty to publish them.  I can derive an example from someone else's 
 module -- maybe yours -- and I will do so if you're actually interested.  
 However, you have now said at least twice that that's not what you want to 
 talk about, and I'm not inclined to do the work if you're not interested in 
 the result.


 I'm still interested in seeing how this can be done, so any sample code 
 useful to understand the approach would be extremely welcomed.
 Just an example, then we can move on.


 So, here is a version of puppet-stdmod without class parameterization: 
 https://github.com/jcbollinger/puppet-stdmod .


Ok, this is what I expected.
Thank you for your time.
I can definitively argue that this is not fully reusable
  (So please show me a reusable module without parameters and without 
hiera functions inside, as that would not be reusable by whoever does not 
use Hiera.)
but it's not relevant since with Puppet 3 data bindings we have the best of 
both worlds.
Personally I see only good reasons to recommend, as patterns for the 
future, modules designed with parametrized classes.


 All management capabilities of the original module are retained.  
 Customization data are provided to it via Hiera (which the module calls 
 explicitly), so the most significant change was simply to convert 
 parameters to ordinary variables initialized vie Hiera.

 The conversion was not entirely mechanical, in that I had to accommodate 
 some Hiera idiosyncrasies -- mainly that it cannot return either undef or 
 (boolean) false.  Inasmuch as one would like the parameterized version to 
 be fully compatible with automatic parameter binding, however, I would 
 account at least some of those adaptations as usability enhancements with 
 respect to the parameterized version.

 I did not convert the tests.

 Also, I do not specially endorse stdmod's particular design (either 
 version).  I would write it at least a bit differently if doing so from 
 scratch, but I think we've agreed to turn the discussion in a different 
 direction.


 John


Yes,
let's go on.
I guess the first steps should be to identify a coherent naming pattern, 
even before single names and define more precisely what parameters might be 
recommended, optional, or considered extensions . 

The google doc is always open to scribble some ideas and proposals.

Al



-- 
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] how to run backtick in erb file

2013-06-25 Thread Virender Khatri
If you are managing sssd* package(s) via puppet, you can try this:

module.pp -

if defined(Package['sssd']) and defined(Package['sssdxx'])
{
$session_variable = sss.so
}
else
{
$session_variable = pam_ldap.so
}

template.erb -

session optional  %= session_variable -%

-

On Tue, Jun 25, 2013 at 6:19 PM, Ken Barber k...@puppetlabs.com wrote:

  I am very new to puppet and wants to implement something like this in my
  puppet template (erb file)
 
  the logic i am trying to do is :
 
   sssd_count=`rpm -qa | grep 'sssd' | wc -l`
 
  % if  sssd_count =2 -%
  session optional  sss.so
  % else %
  session optional  pam_ldap.so
  % end -%
 
  but the backtick does not work.. or i am unable to store the expected
 value
  in to sssd_count
  is there any other way to perform this task ??

 You probably want the syntax to look something like:

 % sssd_count=`rpm -qa | grep 'sssd' | wc -l` -%

 % if  sssd_count =2 -%
 session optional  sss.so
 % else %
 session optional  pam_ldap.so
 % end -%

 Notice how I've wrapped the variable declaration in % -%. However, I
 imagine the real problem here is that templates do not run on the
 destination agent, they run on the puppet master - which is probably
 why it hasn't been working out for you. So unless you're running in
 masterless mode, forget this methodology.

  I will be really grateful if i can get some help ..

 A far more efficient way of doing this, is to make your module install
 the 'sssd' package for you (could be conditional also). That way
 you're not having to detect the state of the package, instead you are
 enforcing the state you want.

 If you really can't do this, then what you want is to write a fact
 that tells you weither the package is installed or not or just a fact
 that grabs all packages perhaps, and you later pick the package from a
 list. Facts run on the agent very early in the cycle, and their
 content is submitted to the master - so can be used in templates like
 the one you have created.

 ken.

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




-- 
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] The handy Grail of Modules Standards

2013-06-25 Thread Alessandro Franceschi


On Tuesday, June 25, 2013 10:10:13 PM UTC+2, Ygor wrote:

 I have been watching this thread grow and metastasize and I would like to 
 offer my opinions: 

 The wonderful thing about standards is that there are so many of them to 
 choose from. Grace Hopper (maybe) 

 There are at least two very different directions to approach this from, 
 IMHO. 

 The first is from the idea to create a universally useable module that can 
 be dropped into any puppet master and run without modification. This seems 
 to me to be the approach of Example-42.


 The other approach is to provide a set of common sense, best-practice 
 guidelines for folks to use to grow their own modules for their own 
 specific needs. 

 I think both are necessary and valuable. 

 My grumble about the Example-42-Swiss-Army-Knife approach is that I would 
 like to know what is absolutely necessary and what is optional. I do not 
 want to implement the equivalent of the Sears Craftsman Gazillon Piece Tool 
 Warehouse when all I need is one lousy Phillip's screwdriver. 


Well the idea is that in the Fat Warehouse you pick the screwdriver you 
need, the others are there, at disposal, mostly harmless.


 I have dug thru some of the Example 42 modules and I have learned more 
 than a few nifty ways of getting things done, but I am working in a 
 one-operating-system environment (Red Hat) and I do not need all the extra 
 code to cover the other OS's. 


Others will.
The first step for modules' reusability is support of multiple OS.

Note, IMHO a reusable module is not always the right choice:
slim and essential code for very specific and internally standardised 
setups can be preferred at times.


 Other grumbles (not only about Example 42) include sparse documentation 
 and examples: If you are going to define a pile of parameters, it would be 
 very helpful to include examples to show how to use them. Very few 
 published modules provide enough detail to make me happy. 


That's another good reason to standardize the names of common sense 
parameters, that can therefore be better documented and explained. 


 The old saying is There's more than one way to skin a cat. (My apologies 
 to all ailurophiles out there, of which I am one) 
 Same thing here. Puppet is a potentially powerful framework for system 
 configuration and management. If you are sloppy about how you use it, you 
 can booger up your systems big-time and lose important data. 

 Exactly how to do it all is not as important (IMHO) as learning right and 
 wrong ways to do individual tasks. It is then up to the individual DevOp to 
 tailor the pieces to fit their particular needs and environment.


Yes, but when this tailoring becomes take existing modules and modify or 
write them from scratch  you end up seeing dozens of randomly documented 
and designed Mysql modules, that can be used in different ways and may have 
weird cross dependencies.

That's why starting for some naming standards helps.
That's also why I personally think that some common modules like apache, 
mysql, nginx, postgres or other that are frequently used by third modules 
should have explicit and dedicated standard parameters for the typical 
defines they provide.
 
my2c
al

-- 
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] The handy Grail of Modules Standards

2013-06-25 Thread Alessandro Franceschi


On Tuesday, June 25, 2013 11:49:49 PM UTC+2, Alessandro Franceschi wrote:



 On Tuesday, June 25, 2013 9:16:20 PM UTC+2, jcbollinger wrote:



 On Monday, June 24, 2013 9:12:17 AM UTC-5, Alessandro Franceschi wrote:



 On Monday, June 24, 2013 3:57:55 PM UTC+2, jcbollinger wrote:


 None of my modules have any parameterized classes, but I am not at 
 liberty to publish them.  I can derive an example from someone else's 
 module -- maybe yours -- and I will do so if you're actually interested.  
 However, you have now said at least twice that that's not what you want to 
 talk about, and I'm not inclined to do the work if you're not interested 
 in 
 the result.


 I'm still interested in seeing how this can be done, so any sample code 
 useful to understand the approach would be extremely welcomed.
 Just an example, then we can move on.


 So, here is a version of puppet-stdmod without class parameterization: 
 https://github.com/jcbollinger/puppet-stdmod .


 Ok, this is what I expected.
 Thank you for your time.
 I can definitively argue that this is not fully reusable
   (So please show me a reusable module without parameters and without 
 hiera functions inside, as that would not be reusable by whoever does not 
 use Hiera.)
 but it's not relevant since with Puppet 3 data bindings we have the best 
 of both worlds.
 Personally I see only good reasons to recommend, as patterns for the 
 future, modules designed with parametrized classes.


 All management capabilities of the original module are retained.  
 Customization data are provided to it via Hiera (which the module calls 
 explicitly), so the most significant change was simply to convert 
 parameters to ordinary variables initialized vie Hiera.

 The conversion was not entirely mechanical, in that I had to accommodate 
 some Hiera idiosyncrasies -- mainly that it cannot return either undef or 
 (boolean) false.  Inasmuch as one would like the parameterized version to 
 be fully compatible with automatic parameter binding, however, I would 
 account at least some of those adaptations as usability enhancements with 
 respect to the parameterized version.

 I did not convert the tests.

 Also, I do not specially endorse stdmod's particular design (either 
 version).  I would write it at least a bit differently if doing so from 
 scratch, but I think we've agreed to turn the discussion in a different 
 direction.


 John


 Yes,
 let's go on.
 I guess the first steps should be to identify a coherent naming pattern, 
 even before single names and define more precisely what parameters might be 
 recommended, optional, or considered extensions . 



Talking about naming schemes, here are some possibilities (copied 
from: 
https://docs.google.com/a/lab42.it/document/d/1D4OqEI5iuGJe63ODU91N6rnFKcxVAg1sAWbaQrGBlWA
 
) we can discuss and improve.


Given the sample names below, there are at least  2 different approaches 
that can be followed, and once defined all the parameters names can somehow 
emerge naturally:
1- Place a common suffix for any kind of parameter
2- Place suffixes for some specific params and leave more general names of 
general ones

Examples for case 1
ensure

package_name
package_version
service_name
service_ensure
file_path
file_source
file_template
dir_path
dir_source

Examples for case 2
ensure

package
version
service
service_ensure
file_path
source
template
dir_path
dir_source
For both cases extra resources can be referred according to their name and 
type of resource, for example: server_package_name, master_file_path, 
controller_service_name and things like that. 

A general pattern could be:
[name_of_resource]_type_of_resource_resource_parameter
- For the “main” resources of a class (main/unique package, main/unique 
service, main configuration file...) the name_of_resource is omitted.
- The type_of_resource reflects Puppet types (are “exceptions” like dir_ 
allowed?)
- The resource_parameter tends to map to a typical Puppet resource 
parameter (exceptions like template, version, options?) 

-- 
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] most current method of configuring cisco (and force10?) devices

2013-06-25 Thread Wolf Noble
Hey Gang,

I've been asked to explore the landscape of network device management via
puppet.

in particular, I'm looking to support cisco, and force10 switches.

I know about the network device system, I'm wondering if that's the way to
go for both cisco and force10, or if there's a better way for one or both?

I've seen the Juniper netdev module, but haven't the gear to play with it.

I'm continuing my research, but figured it wouldn't hurt to concurrently
ask the herd for input.


Thanks in advance!
W

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