similar to: Variable named "memory" in templates

Displaying 20 results from an estimated 3000 matches similar to: "Variable named "memory" in templates"

2011 Jun 30
4
using memorysize fact in manifests
Hi, I want some config depending on memorysize. What I tried was if ($memorysize >= 256 * 1024*1024) { ... } But this fails because $memorysize is a string (and contains a "G") and can''t be compared to an int. Are all facts strings? How do I work with numbers? regards, Andreas -- Andreas Kuntzagk SystemAdministrator MDC Berlin / BIMSB Tel.: +49 30 9406 2997 --
2007 Dec 21
2
Any magic to the name ''memory'' in templates?
I tried using it in a template: <%= memory %> and it put "0" in my file when i switched the variable name to the_memory, it worked Eugene Ventimiglia Director of Systems GridApp Systems e: eventi@gridapp.com o: 646 452 4081 _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com
2009 Dec 09
3
facter 1.5.7 all lsb* items missing
I have 2 RHEL 5.4 systems where all facter lsb* items are missing. Any ideas? Sanitized facter output: architecture => i386 domain => missyou.edu facterversion => 1.5.7 fqdn => broken.missyou.edu hardwareisa => i686 hardwaremodel => i686 hostname => broken id => root interfaces => eth0,sit0 ipaddress => 1.2.1.5 ipaddress_eth0 => 1.2.1.5 is_virtual => true
2008 Jul 01
6
OpenVZ configuration of networking with puppet - big crash
I am trying to streamline the current distribution specific setup and creation of VE''s within OpenVZ with puppet. My first attempt has gone horribly wrong as you will see below. Here''s the script I wrote to replace the redhat specific setup that OpenVZ used: [jleggett@lxp6d15m3 scripts]$ cat redhat-add_ip.sh #!/bin/bash # # Debug - take out later set -x
2012 Jul 05
1
hash to_yaml in erb template not giving valid yaml
Hi, I want to use a file resource to write a facts.yaml file for Mcollective. For some reason it won''t provide a valid yaml format if I dump my scope to hash and convert to_yaml. file { "/etc/mcollective/facts.yaml" : owner => root, group => root, mode => 400, loglevel => debug, #content => inline_template("<%= scope.to_hash.reject {
2010 Oct 14
8
manipulating facter variable
I''m trying to manipulate the following facter variable: ipaddress => 10.85.207.2 What I need is the second group of digits. If it''s 84 then location is A, but if it''s 85 then location is B. In puppet I couldn''t grab this second set of digits, but maybe there is a way? I''ve already tried to make a custom fact, but my ruby knowledge is *ahem* pretty
2012 Aug 23
1
Puppet Agent VS User
Hello, Running into a problem when wanting to daemon-ize the agent. It doesnt seems to do anything: - cannot find any daemon process with (ps aux | grep puppet) - the config is not updated after editing some params on the master - /var/log/puppet stay empty... while, when logged as root, it is working without issue with $puppet agent --test. ##Conf Ubuntu 12.04 Puppet 2.7.11 ## Daemon is
2011 May 23
2
Variable interpolation challenge
I''m having a problem with variable interpolation that I haven''t found a good solution to. I want to use a variable as part of the name of a fact, but the interpolation doesn''t work as expected. I''ve allowed for passing the mac address into my define() but if it''s not provided I want to look it up via facter. if
2013 Apr 18
4
fact_stomp_server
Does anyone have any insight into this error message? err: Could not retrieve catalog from remote server: Error 400 on SERVER: The fact named fact_stomp_server does not appear to be a valid hostname. The value of '''' does not match ''^[a-zA-Z0-9.-]+$''. A common cause of this problem is running puppet agent as a normal user instead of root, or the fact is
2013 Nov 18
3
Is it possible to evaluate a string as a parameter name?
Hi, I''m looking to combine a couple of fact names with the value of a class parameter to create and lookup the resulting fact''s value. Is that possible? For example, my class will take the parameter "my_default_nic" from beyond. So I know that as long as $my_default_nic exists on the client, then so will facts like macaddress_<NIC>, netmask_<NIC>,
2010 Dec 26
6
variables created with generate() function have a newline when used in a template
I have this in nodes.pp $puppetmaster_fqdn = generate("/usr/bin/facter","fqdn") and this in a template http://<%= puppetmaster_fqdn %>:8080 When puppet runs, this is the result: http://puppet.home :8080 Anybody any clue to whats causing this? I''ve tried -%> -- You received this message because you are subscribed to the Google Groups "Puppet
2012 Feb 03
16
neatest way to determine a major version of centos/linux?
Just started a rollout of centos 6.x across our Puppet deployment (100-odd servers). what fact would people suggest I use to distinguish 5.x from 6.x (quite a lot of subsystems are different between major releases)? lsb* facts don''t seem to be present on centos 6 - is this an EPEL bug, or have they just been removed in Facter? Thanks! -- You received this message because you are
2009 Dec 24
7
nested variables
Hi all! I have quation: how i may use nested variables/facts? For example, I have variable $iface. It''s variable declared in node brakets, and, use with defenition. iface may be eth0, eth1(Linux), em0, ... <freebsd>, ... is fact: facter | grep eth0 | grep mac macaddress_eth0 => 54:52:00:3D:CB:40 We don''nt know name of $iface in our module (to generate network
2012 Dec 14
11
Puppet and Mcollective yaml file changing when it shouldn't
Has anyone else ran into this? debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: Executing ''diff -u /var/tmp/facts.yaml /tmp/puppet-file20121214-13448-933j3r-0'' notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14
2010 Aug 31
3
File selection for template() similar to source
I want to be able to have Puppet determine which file to use as the source of a template() call in a manner similar to the source parameter. Basically, I want to have a file resource that will use the most appropriate file for a template. While I can do: file { "file.conf" : source => [ "puppet:///module/file.conf.${hostname}",
2012 Dec 03
4
Unnecessary changes when creating facts.yaml
I have set up puppet to create a facts.yaml file for mcollective using the following line: content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|timestamp|.*free|macaddress.*|ipaddress)/ }.to_yaml %>"), However, it is creating a lot of unnecessary changes by reordering the facts in the yaml output as you can see in the diff output between to
2011 Mar 31
5
Exclude a resource from reports
A little while back I asked how to make puppet not report on a resource.. and was shown the loglevel metaparam: Quoting bellman@nsc.liu.se: There is a metaparameter called ''loglevel''. If you set that to something lower than "notice" (i.e. either "info" or "debug"), then Puppet won''t report that it applied the resource... So I made my
2009 Oct 29
2
template issue: nested variables?
I need to do something like this node foo { $iface = pcn0 ... } # the template <%= network_<%= iface %> %>/<% netmask_<%= iface %> %> The idea being that a file would be built on the client holding the value of pcn0''s network/netmask Of course, I''m trying to avoid hard coding the interface name in order to keep my code portable. Thanks in advance
2007 Nov 13
6
Facter and arrays
Hi, Is it possible to have an array as the output of a custom fact? And then to pass it into a template in Puppet? I currently have a fact that looks like this: Facter.add("exports") do setcode do case Facter.hostname when (/thishost/i): [ "/local", "/local2" ] end end end & a template like this: <%
2009 Jul 30
7
arrays, loops, etc
Inspired by the recent thread titled "Array input of dirs, ensuring their existence" I thought I''d write up the problem I''m running into. I was chatting on irc about it, I don''t think puppet has a clean solution. Like the other poster, I''m defining an object that takes an array. In my case, I''m defining gpg keystore, which can contain a