similar to: generate function not working within conditional?

Displaying 20 results from an estimated 10000 matches similar to: "generate function not working within conditional?"

2012 Dec 27
3
generate() function help
Hi. I want to run script which is distributed with my module, but the problem is I have to then hardcode the path to the script in the generate function call, for example: generate("/etc/puppet/environments/${environment}/modules/mymodule/scripts/myscript") But what If some other site uses other path to their modules, or doesn''t use environments at all? Is it possible
2012 Jun 18
8
Conditional with variable from facter
Hi. I have the following facts available: # facter | grep oper operatingsystem => CentOS operatingsystemrelease => 6.2 Now, if I wish to use conditionals on these facts, I have to do it like this: case $operatingsystem {} case $::operatingsystemrelease {} I''m puzzled as to why can''t I just use $operatingsystemrelease, and what do these two semicolons mean? Thank
2012 Sep 05
4
Custom type obligatory field?
Hi. I''ve been trying to develop a module for managing Cobbler from puppet. So, I need a custom type - cobblerdistro, which will fetch ISO from http, unpack it at desired destination and register distro with Cobbler. I have one issue with ensure => absent situation. First of all, here is my type: <code> # cat type/cobblerdistro.rb Puppet::Type.newtype(:cobblerdistro) do @doc
2012 Dec 04
14
custom define type for array with 'case' argument pass to it
I am trying to write a define type which will use an array but in the meantime have an argument pass to it that sets a case. See for example : define link_files ($linkcase) { case $linkcase { "var" : { file { "${name}_exelink" : path => "/var/log/puppet/${name}_log", ensure => link,
2013 Feb 06
3
PuppetDB builtin backend performance?
Hi, I''m using PuppetDB with builtin backend, haven''t switched yet to postgresql, and I''m starting to see decrease in performance of my agent runs. I use PuppetDB solely because of exported resources support. How soon should I think about moving to PostgreSQL? How many clients does my master need to serve, so that PuppetDB in it''s default installation,
2012 Dec 29
1
Puppet module for managing Cobbler
Module on forge: http://forge.puppetlabs.com/puppetlabs/apache Code and issue tracker: https://bitbucket.org/jsosic/puppet-cobbler Comments are welcome, hope somebody finds it useful. I''m very happy with it so far :D The reason I''m posting it is that couple of people asked me about publishing this module while I was in a process of developing it, so If those people
2013 Jul 13
10
username/password combo for custom provider (couchbase)
Hi, I''m trying to program custom type for managing Couchbase buckets. Problem is that every RW operation to Couchbase cluster (creating, deleting, resizing bucket) requires admin privileges (username/password). Do you have any suggestion how should I pass the username/password to provider? If I make it a param, then every resource of type ''couchbucket'' will need to
2013 Mar 05
12
Boolean in hiera... problems again
Hi... I''ve been trying to set up boolean values in Hiera, but with no luck. For example, I''m using puppetlabs-haproxy module, and this is a code snippet: class haproxy ( $manage_service = true, ... ) inherits haproxy::params { ... if $manage_service { } } Now, this is how I set up values in hiera: haproxy::manage_service: false But, it seems that
2012 Sep 07
7
passenger-install-apache2-module fails
Hi I have installed passenger on many machine and this is my 3rd puppet master on CentOS 6. This one is giving me problems and I have been trying with different gem versions and still no go. When I run passenger-install-apache2-module I get this error: Sorry its really long so I copied to a text doc attached to this post. Any Idea on whats going wrong. I have not had a problem with this before
2013 May 09
7
Are multiple environments broken in puppet?
I started getting the following errors from my puppet master: > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter provider at /some/module/manifests/foo.pp The module would vary, but the error was always the same. I started googling, searching lists, etc. And turned up a whole bucket load of issues that all seem related and are all unresolved:
2012 Aug 20
4
puppet-lint and 80 characters line limit?
Hi. I''m getting lots of warning like this one from puppet-lint: WARNING: line 67 has more than 80 characters Now, I don''t like warnings, so any idea how should I rewrite this line for example, to void the warning? package {''rpmforge-release'': ensure => ''0.5.2-2.el6.rf'', provider => ''rpm'', source =>
2011 Aug 18
10
Circular RPM dependencies...
Hi. I encountered a following problem, if I state for example: package{"aspell-en": ensure => absent, } package{"aspell": ensure => absent, } I get error in logs because of dependencies. It seems that puppet uses ''yum'' for installation on CentOS and ''rpm -e'' for removal of packages, so it cannot handle this kind of dependencies:
2012 Nov 28
3
Could not retrieve information from environment production source
I''m using puppet 3.0 i install puppet by these two command: sudo rpm -i http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm sudo yum install puppet-server as http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#for-red-hat-enterprise-linux-and-derivatives and
2012 Jan 15
2
Samba 3.6 problems with idmap rid
Hi! I am using mainly Samba 3.5 on CentOS, and I was very pleased with idmap_rid backend for SID-to-RID mappings. But on Solaris 10, I can only use 3.6 because OpenCSW ships only 3.6. Problem is, things are changed and are not working as expected... Here is my config on RHEL Samba 3.5: [global] workgroup = WINDOMAIN realm = WINDOMAIN.LOCAL server string = localserver
2012 Dec 12
4
Converting puppet client to servr
Is there an easy way to convert a puppet client into being a puppet master? Here''s the scenario. I''m using puppet to configure all my systems, and would like it to be able to deploy a new puppet master as well. We have systems worldwide so having local puppet masters is very desirable for fault tolerance. So Kickstart (via cobbler) installs a puppet client during the initial
2012 Feb 03
1
Samba 3.5 & CIFS mounts - long standing issue...
Hi. I can see that this is a long long standing issue... Apparently things changed in Windows 2008 R2, and after upgrade of domain from R1 to R2 cifs mounts don't work anymore between Linux servers. Windows can see Samba shares and mount them, but CIFS on another Linux box cannot... Here is a thread with explanation in lenght: http://ubuntuforums.org/showthread.php?t=1178484 I get the
2013 Jun 24
1
Deprecation notice on custom type?
Deprecation notice: Resource references should now be capitalized on line 101 in file /etc/puppet/manifests/templates/basenode.pp This is the specific line of code: realize (users::useraccount[hiera(''users'')]) When I capitalize Users, I get the following error: Error 400 on SERVER: Could not parse for environment production: Syntax error at
2012 Jun 14
2
Puppetmaster and two IP addresses?
I have a problem with puppet on a machine which has public and private IP address. My nodes are on private lan, and hostname of master is FQDN of the public IP. Client''s just cannot connect. Problem which I get is: err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed I''ve added
2012 Jul 27
11
Possible to push changes to nodes?
Dear readers, When I have made a change to a template, class or file, is it then possible to push this change to the node(s), so they get the changes now? I would like to be able to push the change from the master, and not have to login to each node and pull. Is that possible? Hugs, Sandra -- You received this message because you are subscribed to the Google Groups "Puppet Users"
2012 Aug 22
2
Hiera, OSSEC and per-node stuff?
Hi. I have an interesting use case. OSSEC is security tool based on server-client architecture. Server generates keys for agents, and every agent has different key. Now I want to distribute these keys via puppet. I''ve come accross hiera and installed it, and it works superbly, but how to store per-node key in hiera? This is my idea: hiera,yaml: --- :hierarchy: -