Displaying 20 results from an estimated 1000 matches similar to: "Using backreferences from node name regex match"
2013 Sep 11
6
Puppet ignores hiera completely
I''m not sure at all what''s going on here, but I''ve spent a lot of time
reading over the puppet hiera docs and setting everything up, but when I
run puppet agent it just seems to ignore the hiera setup completely.
Both the puppet master and agent nodes have exactly the same versions of
puppet and hiera (installed via the official puppet APT repository). I''ve
2007 Mar 08
2
Named backreferences in replacement patterns
Hi
I have a problem with substitutions involving named backreferences. I
have a vector American.dates:
> American.dates
[1] "5/15/1976" "2.15.1970" "1.9.2006"
which I want to change into British.dates:
> British.dates
[1] "15/5/1976" "15/2/1970" "9/1/2006"
I know I can do it like this:
2012 Nov 02
2
backreferences in gregexpr
Hi Folks,
I'm trying to extract just the backreferences from a regex.
> temp = "abcd1234abcd1234"
> regmatches(temp, gregexpr("(?:abcd)(1234)", temp))
[[1]]
[1] "abcd1234" "abcd1234"
What I would like is:
[1] "1234" "1234"
Note: I know I can just match 1234 here, but the actual example is
complicated enough that I have to
2009 Oct 03
1
Named backreference in gsub()?
Hi,
I'm running out of the *numbered* backreferences \\1, \\2, ..., \\9
for gsub(). Does R support *named* backreferences, and if so, what is
the syntax?
Thanks
Henrik
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
2013 Aug 30
3
rspec-puppet not working
I''m trying to get rspec-puppet working and have run into a problem. I have
a VM running ubuntu lucid, have installed rubygems 1.3.5 from the apt
package and have install rspec-puppet (and other required gems), and rake,
using gem install.
I''ve run rspec-puppet-init in the module I want to test, and have created a
very basic spec file for one of the classes in my module.
2008 Oct 28
1
gsubfn, strapply, REGEX Problem
Hi all,
I swear this used to work:
library(gsubfn)
strapply("S(AC,P)TVDK(8)EELVQK(8), ".[(].{1,2}[)]|.")[[1]]
But somewhere along the update path it stopped ... now giving me this
Error in base::gsub(pattern, rs, x, ...) :
invalid backreference 2 in regular expression
Can't figure it out. What am I doing wrong?
Thanks for any hints, Joh
2011 Oct 19
5
How to know the generated certname used by a puppet client, for reuse within erb (because of cloud provisioner) ?
Hi,
I am using the cloud provisioner to bootstrap some ec2 nodes, and these
clients are signed using a randomly generated certname, which is put in
/etc/puppet.conf at the bootstrap time (eg certname =
d7bcd693-73fd-495f-0876-ff91ea11111e).
But my puppet code repo also manages the puppet.conf file, so the file will
be overwritten on the client at the first puppet run. Nevertheless, i should
not
2012 Nov 20
2
hiera values issue
Hi, I have a puppetmaster - agent architecture. I have a module for the
vsftpd configuracion in the agents. The configuration of the value
''max_per_ip'' in the agents may vary. This is a line of the manifest:
$max_per_ip = hiera(''max_per_ip'',10)
I want to specify different values for each agent using hiera. The problem
is I am only able to specify the
2012 Nov 16
4
[LLVMdev] Proposal: Enhance FileCheck's variable matching capabilities
Hello,
FileCheck allows us to define match variables and use them on
subsequent lines. This is quite useful, but could be even more useful
if it was possible to use the variable later on the same line it
matched. For example, I would want to write this:
; CHECK: bic [[REG:r[0-9]+]], [[REG]], #3
But I currently can't because [[REG]] will only match a REG variable
defined on a _previous_
2013 Jan 22
6
Security considerations for basing decisions on facts
Hello,
Let''s consider the scenario when a client node in a puppet environment
gets compromised.
In case some of the puppet modules make decisions based on agent facts,
these modules are potentially exposed to abuse from the malicious puppet
agent.
For example, if a class has:
if $some_fact == ''some value'' {
# deploy some configuration
}
then the compromised node
2007 Aug 23
2
Splitting strings
I'm having a Thursday morning mental block, any suggestions on the following
would be most appreciated...
I have (as an example)
surgery = c("d48", "d67", "dnc37", "a75", "d10", "a78", "d31",
"d55", "d1")
before each number part the possibilities are c("a", "d",
2013 Sep 17
6
rspec-puppet require syntax
Can someone tell me the correct way to specify the following require
statement in an rspec-puppet test?
*require =>
[Class[''ssl''],Class[''pcre3''],Staging::Extract["nginx-${version}.tar.gz"]]*
I tried this: *''require'' =>
2006 Oct 20
2
Calling a method in a gsub?
Ok, so I would like to do something like this:
string.gsub(regexp, output(''\0'' ,''\1'', ''\2'')
Output returns a string.
I tested it in irb and it worked ok. Now when it''s in my application,
the ''\1'' and others don''t resolve as backreferences to the matches as
they should. How can I fix this? Or go around
2013 Jun 17
2
Puppet Management with Dual Boot Workstation
Hi everyone, I''m trying to figure out what is the best way to handle a
single system that dual boots with a puppet client running in each. In
this case we are talking about Ubuntu 12.04 and Windows 8. Should I just
copy the certificate from one OS to the other? Should I have a different
certificate for each OS? In this case can they have the same hostname, as
it is the same IP
2005 Aug 03
2
regexpr and portability issue
Dear all--
I am still forging my first arms with R and I am fighting with regexpr() as
well as portability between unix and windoz. I need to extract barcodes from
filenames (which are located between a double and single underscore) as well
as the directory where the filename is residing. Here is the solution I came
to:
aFileName <-
2012 Nov 05
6
err: Could not request certificate when I run "puppet device"
1. I get the following error when I run “puppet device’
err: Could not request certificate: Could not write
/var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem to
privatekeydir: Permission denied -
/var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem
Any thought?
Thanks,
--
You received this message because you are subscribed to the Google Groups
2018 Feb 13
1
Help with regular expressions
You can either use positive lookahead/lookbehind - but support for that is a bit flaky. Or write a proper regex, and use
backreferences to keep what you need.
R > x <- "abc 1,1 ,1 1, x,y 2,3 "
R > gsub("(\\d),(\\d)", "\\1.\\2", x, perl = TRUE)
[1] "abc 1.1 ,1 1, x,y 2.3 "
B.
> On Feb 12, 2018, at 9:34 PM, Jim Lemon <drjimlemon at
2005 Aug 20
2
Questions on "\" vs "/" on Windows
A recent thread on R-help reminded me of some questions I have
regarding the path separator on Windows.
The thread: [R] using paste and "\" to create a valid filename
The question:
What are the use-cases where "\" is required for paths passed as
character vectors from within R?
My experience has been that "/" always works and "\" often fails due
to
2008 Aug 06
2
matching problem
I have a matching problem that I cant solve.
mystring = "xxx{XX}yy{YYY}zzz{Z}" where "x","X","y","Y","z","Z" basiclly can
be anything, letters, digits etc. I'm only interested in the content within
each "{}".
I am close but not really there yet.
library(gsubfn)
strapply(mystring,"\\{[^\\}]+",, perl=F)