Displaying 20 results from an estimated 10000 matches similar to: "Does stdlib break the regsubst function?"
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 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 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 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 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
2013 Dec 12
2
Stdlib and Defined Types
All,
Does anyone know of a way to add a file-centric backtrace to the validate
functions in the Stdlib?
If you use a validator in a defined type, you end up not having any idea
what actually threw the error.
Though much has moved to parameterized classes, there are still times when
defines are useful and it would be nice to know what calling
class/define/stack was blowing up.
Thanks,
Trevor
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 Dec 04
1
Does puppet stdlib suppor puppet 3.0.1?
In puppet stdlib doc here at https://github.com/puppetlabs/puppetlabs-stdlib,
it only mentions its support for puppet 2.6 and puppet 2.7. Puppet 3.0.1 is
not listed there.
Why puppet 3.x is not listed in the above doc as supported?
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to
2012 Aug 29
9
puppetlabs-stdlib
I''m confused about this...
https://github.com/puppetlabs/puppetlabs-stdlib/
I see a lot of functions there that are the same as the ones that come
standard with puppet. If I create a module and dump this stuff in
there, what happens to the existing stuff? How does puppet know which
one to use?
Doug
--
You received this message because you are subscribed to the Google Groups
2012 Apr 11
8
Facter not initialized in rspec in puppetlabs-stdlib?
I have been working on adding some predicate functions to puppetlabs-stdlib
that test things based on ''interfaces'' and related facts.
The functions themselves seem to work fine in my manifest-based smoketests,
but I am running into trouble that may or may not be due to my ignorance
about rspec or Facter. Something needs to be done to initialize Facter
because
2012 Mar 29
4
stdlib module not working
I´m trying to utilize the new stdlib module, but got stuck after
installation on my puppet server.
I´ve tried to use the included test file file_line.pp on the server, but
it´s only creating the file - but not managing the content.
the same problem on my clients (the new provider file_line has been
synced), it´s just not working:
file_line { ''puppet master host
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 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 =
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
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
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
2016 Nov 17
2
"-stdlib=libc++" applied to CMAKE_CXX_FLAGS
llvm/cmake/modules/HandleLLVMStdlib.cmake specifies "-stdlib=libc++" for
CMAKE_CXX_FLAGS when LLVM_ENABLE_LIBCXX and CXX_SUPPORTS_STDLIB. From what
I can see this is a flag intended for the linker and not the compiler.
I'd like to submit a change to delete CMAKE_CXX_FLAGS from this append() but
I wanted to check in with the list to see if that makes sense or if there
are other
2013 Jan 07
16
stdlib take almost 14 minutes to sync on CentOS Vagrant VM
Hi,
I have a fresh CentOS 5.8 Vagrant VM that I''m using to emulate a customer''s
server. During the first Puppet run, it takes 13 minutes and 48 seconds to
sync the Puppet Labs stdlib module. On a similar Ubuntu 12.04.1 Vagrant
VM, Puppet starts up, and almost instantly goes from plugin sync to facter
load.
Is this load time for stdlib on a RHEL variant normal?
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