similar to: use regex to ensure multiple directories are absent or exist

Displaying 20 results from an estimated 1100 matches similar to: "use regex to ensure multiple directories are absent or exist"

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 May 10
14
Puppet Master System Requirements
I''ve been messing around with Puppet on a VM on my personal desktop. It looks descent. I was wondering what kind of load this thing would have managing about 400 nodes. Does this thing require a beefy server? -- 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
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 =
2006 Mar 10
3
[Prototype] understanding evalScripts
Hi, I have a misunderstanding of what I though evalScripts would do vs what it actually does. I''m wondering if there''s a way that I can make it do what I want. my initial page: <html> <head> <script... var page = ''initial''; ... <body> <div id="replaceMe" <script... page = ''in
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 =
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
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
2006 Jun 02
1
Generator that alters existing files
What''s the best way to go about writing a generator that can add text into an existing file? The point in the file is marked with a unique token, I want to insert a few lines after the line with the token on it. Is this possible/easy/already done by someone? Thanks
2006 Jan 23
1
How to set-up LCR
How to set-up LCR ? a. which companies can be used with LCR? b. how to set-up & maintain LCR? c. multiple connection to one gateway? Example: +886223456789 could be reachable via a. ENUM free b. Dundi free c. Voipstunt free d. Voipbuster free e. Nufone $ f. Voipstunt $ g. others with 4 concurrent connections $$ h. others with 3 concurrent connections $$ I am looking
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
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
2009 Sep 04
1
ssh_authorized_key always ensure absent even it's present
puppet version 0.24.8 from debian lenny-backports My class works and resource created the authorized_keys file. But puppet detect as ensure absent and added again and again my authorized_keys got fews the same key lines. I added the target => ''/home/test/.ssh/authorized_keys'', again ensure is absent. I replace the ssh_authorized_key.rb from 0.25rc1 and again ensure is
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
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
2011 Nov 18
2
Using regex to ensure package version
I''m trying to use something like this... package { "blah": ensure => "1.2.3*" } ...and I know that doesn''t work because it looks for a package literally with that value "1.2.3*". What I want is to say, install the latest package in the 1.2.3 branch but don''t automatically upgrade to anything later than that. e.g. 1.2.3-01, 1.2.3-05
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