similar to: How do design next-gen modules, any guidelines ? a question for gurus...

Displaying 20 results from an estimated 20000 matches similar to: "How do design next-gen modules, any guidelines ? a question for gurus..."

2012 Feb 06
3
Passing class parameters to hiera
I am using puppet 2.6.11 and want to pass parameter for implementing sudo for mulitple users. So here is my simple code, which I would like to pass to hiera to specify user name lookup. Appreciate any help, thanks in advance. class sudo( $name) { #Class:: sudo # # package { "sudo": ensure => present, } file { "/etc/sudoers": owner => root, group => root,
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers, I am having a philosophical question about parametrized classes. When building modules, one wants to be as flexible as possible, to try to target as many puppet flavors as possible. This is our target: - Foreman users, using foreman as an ENC with smart variables (or potentially any other ENC, but I would say this is the most widespread one). - Pure Puppet''s site.pp
2013 Jan 11
13
Profiles, Hiera, and create_resources('class','...')
Hi all, We''ve recently started exploring the role / profile / component module described by Craig Dunn in his blog here: http://www.craigdunn.org/2012/05/239/ and discussed on the list the other day. As I was implementing this for a profile using the apache module, I realized that I could make another refinement to our approach by using
2012 Dec 14
2
Duplicate declaration for invoking a class
Hi everyone, Here are the manifest I am using: In file ''*modules/test/manifest/init.pp*'': class test ( $test = undef, ) { notice("Here is the message: ${test}") } Now in ''*modules/saas/manifests/client/sudo.pp*'': class saas::client::sudo { class { ''test'': } } Now in ''*manifests/sites.pp*'': import
2013 Jun 20
2
Re-inventing the Wheel (again?)
I''m new to puppet and working my way through the documentation. I''m struggling with the puppet labs module repo. I''ve toyed with numerous automation and configuration methodologies over the decades. Perhaps I''m seeing puppet wrong, Compared with CFEngine there is a a lot I like, but I''m not sure why I''m still having to re-invent the
2013 Jan 30
1
Hiera parameter lookup, nesting variables and Puppet 3
Hi, I''m trying to reconcile the advice in the Puppet 3 class doc with our current use of Hiera. We currently retrieve variables from Hiera in one big collection while the Puppet 3 doc seems to indicate storing variables without the collection. For example, we have a module to manage a log indexer. In its init.pp it says: class log_indexer( $log_indexer_conf =
2012 Sep 24
4
Overriding variables.
I am trying to override variables in a class that is defined in the default node profile. I want parent class to be included in every single node, but override its variables in others. I have tried it several different ways now, and every single time the variables either become unset (undefined) or are set to the value of the first if statement. Here is my current iteration of failure.
2012 Jul 05
7
proper usage of global variables / node variables / +=
Hello puppet masters, I am cleaning up some puppet modules, using puppet-lint. The warning I am getting is: top-scope variable being used without an explicit namespace I can turn this particular check off, but in doing my research I''m finding all sorts of messages saying to avoid using +=, to avoid using variables in the node scope, and to switch to a parameterized class whenever
2012 Jul 01
1
puppet-hiera used with Parameterised class
Hi Puppet Users, For some bizzare reason I am unable to use hiera-puppet with a parameterised class. The output is: ---------------------------- root@hiera hieratest/manifests# puppet apply -e "include hieratest" Error: undefined method `catalog'' for #<Hash:0xb6c53d00> at line 1 on node hiera.localdomain Wrapped exception: undefined method `catalog'' for
2013 Nov 15
7
Class declaration ordering causes duplicate resource error
Has anyone run into this issue before? http://projects.puppetlabs.com/issues/5046#note-17 Is there something obvious that I''m 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+unsubscribe@googlegroups.com. To view this
2012 Sep 26
6
Puppet 2.7, hiera 1.0 and hiera as an ENC
This is the situation I have: All my hosts are the* same OS.* All my host are in the* same puppet environment,* so I cannot use %{environment} I have a module that sets all the *basic* functionality for the OS, resolution, authentication, security, packages, etc I have a module for each application hosted. At the moment all the ''data'' is in Puppet, mostly in parametrised
2013 Mar 15
3
advice on module organization
Hi Folks, Like to get some advice on module organization. I have a system that has a few different components. One or more components can be installed on a host. The hosts also have a "type" dimension. This "type" dimension could (should) ideally be used to configure the system (fill in a bunch of variables). Problem is, I''m not sure how the best way to do
2013 Oct 24
1
Puppet components and configuration / Hiera patterns
We have embraced Hiera; we use the YAML configuration system currently and on the whole everyone finds it easy to use and intuitive. However, as our manifests have grown more complex, we have a need to "compile" multiple narrowly-focused classes together into different types of high-level roles. For example, we might have a "webmail" class that pulls together classes for
2012 Jul 18
1
create_resources function and puppet enc
Hi, I am trying to create multiple users using puppet. I have created a ENC and trying to use class wrapped defined types with create_resources function. For some reason things are falling apart. I would really appreciate some help on these Here are the details about my classes and configuration http://serverfault.com/questions/409001/create-resources-function-and-puppet-enc -- You
2012 May 15
4
enabling a yum repository
I have a class that pulls in some yum repositories. One of the yum repositories is disabled, but on one host I''d like to enable it. i.e. I''d like to do something like this: class { ''myyumrepos'': } yumrepo { ''EPEL'': enabled => 1, } What''s the best way to do this? I am using an ENC. -- Biltong biltong@fastmail.fm --
2012 Apr 24
9
Moving from Puppet 0.25 to Puppet 2.6+ : global scope/variables
Hi, I worked with puppet (< 0.25) back in 2008/2009. We were able to deploy 200 servers from scratch and manage them. It worked fine. I''m now with a new customer and I''m pushing Puppet (and I''m also back to puppet on a side project). We''re considering Puppet 2.6 to manage RHEL/CentOS 5 or 6 hosts. I''m "upgrading myself" to Puppet
2011 Nov 22
2
declare and include classes
Hi all, after moving to parametrized classes, I''ve started to declare them instead of including. Now, I''m trying to understand the differences (internal) between declare and include, and, reading http://docs.puppetlabs.com/guides/parameterized_classes.html again, I found some sentence which confuses me: "Since include wasn’t designed for use with parameterized
2013 Aug 28
3
passing hiera data to custom fact
I need to create a custom fact based on a parametric information (I need to get the IP of another machine knowing the hostname, the machine name could be different for different nodes so I need it parameteric and I recover the machine hostname from a hiera, but for the purpose of the question it could also be a data in the module definition). I''m installing a cluster and need to get
2012 Oct 08
1
Resource Scope
I can''t work this out and I''m getting frustrated. :( Puppet is complaining: err: Failed to apply catalog: Could not find dependency Lvm::Volume_group[bcvg] for Lvm::Application_volume[cache] at /truth/sauce/env/prod/modules/object_store/manifests/server.pp:47 Yet, if I comment out that line so that puppet runs ok, and then look at the state.yml file on the client, I see:
2013 May 02
2
Puppet 3.1.1, hiera and parameter autoload
Hello all, I don''t know if I have hit a strange bug or it''s just an incorrect interpretation about how parameter autoloading works... Today I have been searching, analysing and about to hit my head against a wall trying to figure out why a call to hiera_hash was not merging data from top level among different hierarchies. The problem was that I was trying to do something