similar to: regsubst questions

Displaying 20 results from an estimated 200 matches similar to: "regsubst questions"

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 =
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 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 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
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
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
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'',
2005 Dec 16
2
multiple plots per page
R-help, I would like to place nine (3X3) plots per page. I am not properly implement mfrow(3,3) in the script below: jpeg("xyplot.jpg") #names output file my_args <- commandArgs() #sets up to take args from dos batch command mfcol(3,3) #set page for 3X3 TEMPS <- c(-15,25,85)#list of temps VBATS <- c(3,3.6,4.7)#list of Bats BOARDS <-
2012 Feb 29
3
Modifying a FACT Value In a Manifest
In my network every subnets default gateway is X.X.X.1. That router gateway is always running ntpd which I want to give be default as the ntp server in every hosts ntp.conf. Since there is no official "default gateway" fact yet, what I want to be able to do in my manifest is take the $ipaddress fact and turn it into the gateway for that subnet. For example... IP = 10.1.1.12 GW =
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
2005 Dec 14
2
Append tables
R Help: I have read a number of tables into R with identical headings and I would now like to make a single table that has all the data appended under this single heading line. for example: t1 <- read.csv("f1",header=TRUE) t2 <- read.csv("f2",header=TRUE) all <- c(t1,t2) #all is now twice as wide as t1 or t2 with the same number of row!!!! #I need to know how
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
2012 Jul 10
2
how can I show the xlab and ylab information while using layout
hi R-users: I want to draw three plot into one figure by layout and the script has been shown below. But I find R does not show the xlab and ylab information completely as shown the figure attached. How can I midify the script.? thank you . xxlab<-paste(cpmd," (",ro,"%)",sep=" ") yylab<-paste(rfmd," (",co,"%)",sep=" ")
2006 Nov 09
3
function
R-help, I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc <- function(lst,mn,sd){ lst <- sort(lst) mn <- mean(lst) sd <- sqrt(var(lst)) return(lst,mn,sd) } data1 <-c (1,2,3,4,5) data2 <- c(6,7,8,9,10) myfunc(data1,data1mn,data1sd) myfunc(data2,data2mn,data2sd)
2010 May 28
2
package question
The ICAClient package requires the 32 bit versions of libXp and openmotif. I have this class defined: class icaclient{ case $architecture { i386: { package { "ICAClient": provider => rpm, source => "$kickstart/ICAClient/RHEL5/ ICAClient-11.100-1.i386.rpm", ensure => installed, }
2013 Oct 28
1
inline_template private method `gets' called for false:FalseClass
Hi, I am new to Ruby ERB and inline_template. Can anyone spot what''s wrong with this inline_template? $moddedContent = inline_template("<%= puts gets(nil).gsub(/one two three/,\"\") /tmp/blah %>") exec { "/bin/echo ''${moddedContent}'' > /tmp/blah" : } When I try to apply it, I
2013 Sep 19
4
Array being flattened
Hello All, I''ve run into an issue where an array that''s being passed into a defined type is being "flattened" when it''s inclosed in double quotes and I''m not sure how to get around this. This is happening a the pdxcat/amanda module and I''ve raised an github issues for this but wanted to query the community as a whole. The issue and my branch
2002 Aug 02
0
[Bug 378] New: sshd does not update utmp/utmpx records correctly when "UseLogin" feature on
http://bugzilla.mindrot.org/show_bug.cgi?id=378 Summary: sshd does not update utmp/utmpx records correctly when "UseLogin" feature on Product: Portable OpenSSH Version: -current Platform: MIPS OS/Version: IRIX Status: NEW Severity: normal Priority: P2
2004 Apr 21
1
Macro Substitutions Printing . . .
man smb.conf says: The print command is simply a text string. It will be used verbatim after macro substitutions have been made: But then it says: With printing = cups, and if SAMBA is compiled against libcups, any manually set print command will be ignored. How can I use those macro substitutions to log printed pages ? I used the following in the printer share: root preexec = echo