similar to: Modifying a FACT Value In a Manifest

Displaying 20 results from an estimated 500 matches similar to: "Modifying a FACT Value In a Manifest"

2012 Mar 12
10
Use onlyif in EXEC
Hi guys! I need configure one command exec with onlyif parameter. I want test file size exist or no. Ho i do this? Tks in advanced. Douglas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to
2006 Aug 01
2
Indexing issue
Hi, R is having the following weird behavior and I am not sure if that is a feature or a bug: I am working on the following "3D" array: > bIm , , 1 [,1] [1,] TRUE [2,] TRUE [3,] TRUE [4,] TRUE [5,] TRUE > class(bIm) [1] "array" > dim(bIm) [1] 5 1 1 When I try to get the first 2D subarray, the whole thing folds into a vector: > bIm[,,1] [1] TRUE TRUE TRUE
2012 Jul 25
3
manifest variable with sed - problem
Hello, i have a problem in my sudo manifest file, because in the variable $name comes sometimes usernames like user.lastname, but i need for sudo (includedir */etc/sudoers.d/*) file names with no dots (like user_lastname). I need a new variable, where is the dots change by underscores. My first try was like this, but it isn''t working well. $name_underscore = "`echo $name | sed
2006 Aug 09
2
Speeding indexing and sub-sectioning of 3d array
Hi, I am having a problem with a very slow indexing and sub-sectioning of a 3d array: > dim(arr) [1] 245 175 150 For each point in the array, I am trying to calculate the mean of the values in its surrounding: mean( arr[ (i - radius):(i + radius), (j - radius):(j + radius), (k - radius):(k + radius)] ) Putting that code in 3
2013 Jun 10
5
Does stdlib break the regsubst function?
Hi all, We are currently using the regsubst function of Puppet to generate some information out of our hostnames (customer, environment, and so.). The manifest is running fine since months. 7: $customer = regsubst($::fqdn, ''(^[^-]*)-[^-]*.*'', "\\1") 8: $environment = regsubst($::fqdn, ''^[^-]*-([^-]*).*'', "\\1") 9: $product =
2011 Aug 25
5
custom fact regex problem
Hi guys I have a custom fact envt, it was working fine but now I have to make some changes in it; puppet client''s hostname is of the type 1234qa-abc-de.local where 1234 can be any thing of any length.My custom fact should contain qa, ie I want to check in the first part(before the first -) of the hostname if there exists a pattern/word qa and if it exists then my custom fact for envt
2010 Apr 23
1
regsubst questions
I am attempting to set some variables in my manifest and I amd seeing a result I don''t quite understand. Here is a section of code from my manifest: $boot_time = generate(''/usr/bin/env'', ''/bin/date'', ''+%H:%m'') notice("boot_time => $boot_time") $boot_hour =
2012 Oct 19
3
Node specific exported resources
Greetings, I''m trying to wrap my head around a solution to a problem I''m facing with an exported resources configuration I have. I''m using the following simple config to build a munin configuration: @@file { "/etc/munin/munin.conf.d/${::fqdn}.node": content => "[All Hosts;${::fqdn}] address ${ipaddress_eth0} use_node_name yes\n\n", tag
2012 Feb 16
2
Basic string manipulation in puppet
Hi all, Been searching the net for a few hours now. I have a basic operation I wish to perform but, cannot find examples close enough to what I''m after to implement it myself. This is what I want to do: $version = ''10.2.0'' I want to manipulate the string to make a new var ($cutversion), equal just 102. For example in perl (since I know it): $version =
2012 Aug 27
5
Append string to list items.
I have an array: $nodes = [''gfs01'' ,''gfs02'', ''gfs03'', ''gfs04] and a string variable: $brick_store = "/var/bricks" How can I append "/var/bricks" to each item in the array? Lack of a looping construct makes this challenging in puppet. Such that: brick_array = [''gfs01:/var/bricks'',
2012 Oct 02
4
Removing intermediate variables in calculation
Hello, I have a small Puppet 2.7 module to configure Sonatype Nexus Professional. The module takes, among other things, a baseurl in the form of "http://example.com/path" and I''d like it to extract the "/path" from that variable into a separate variable IF an optional "path" variable haven''t been supplied. Here is an extract: class
2011 Jun 13
15
puppet clients
I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory. I have a manifest that works fine on the puppet ''master'' I have added the client into
2013 Oct 11
6
puppet class if
Hello, I created puppet class and I want the file operation to be executed on all servers but not on server with hostname "''server1.domain.com". I tried this class, but it does not work. Is there any other way? Thanks class test { if $hostname != ''server1.domain.com'' { file { "/etc/ntp.conf": owner
2004 Jun 20
7
Date Time Stamp with Caller ID
Where does the date/time stamp from Caller ID come from? On my extensions ATA188 and IAX2 soft phone the caller id date / time is 12/30 12:00AM. The Linux time is correct. SayUnixTime return the correct time. Any Ideas? Does this work? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
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 Oct 26
2
Using regex to match hostnames in hiera
Hi, I''m having a problem with extlookup not respecting the ''certname'' parameter[1].  When executing a puppet run with either the --certname or --fqdn parameters, it ends up using the specified SSL certificate and gets the correct node definition applied from the puppetmaster.  However, it still retrieves extlookup data using the node''s actual FQDN, not the one
2011 Feb 17
1
Nested defined resources
I''m working on a module to handle creating and populating Python virtualenvs. Without going into too much detail, basically these are nicely-encapsulated environments into which python packages can be installed and run. It''s not uncommon to have several virtualenvs on a system, potentially with the same packages installed (maybe different versions). Puppet''s defines
2012 Jun 25
3
Base directory with File
Hi all, I''d like to specify a base_directory and a list of directories (as variables that may be pulled via hiera later) that will be created under that base directory. base_dir = "/home/base" bars = ["a", "b", "c"] bars will be used to create the folders under base and also part of the information going into building a template so I
2011 Jun 06
1
use a custom fact value in a manifest
Hi everybody, i''m a lucky Puppet user for a few weeks and i''m currently "blocked" for a "simple" thing. I try to use facter custom values deployed with pluginsync feature in one manifest. Unfortunately, values aren''t available when manifest is executed. I tried to use pre/main stage in order to deploy my facts with a pre stage class but it
2012 Jun 27
6
Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82
I have a module located at /etc/puppet/environments/test/modules/ruby. I n this I have a manifests folder with two .pp files - init.pp and gemInstall.pp. In one of my node def files I have: include ruby ruby::gemInstall { ''someGem-version.gem'': path => ''/path/to/agent/local/gem/repo'', } ruby::gemInstall is a define, and it has some logic to get around