similar to: Removing intermediate variables in calculation

Displaying 20 results from an estimated 100 matches similar to: "Removing intermediate variables in calculation"

2012 Oct 02
3
PROBLEM : Cannot require an Exec
hello: i currently am using Puppet to run some commands in a sequence. there are two sequences of exec resources. we found that we cannot use require => Exec and it does not work at all as expected. here is some sample code. exec { "exec-AAA": command => "/bin/true", returns => 0, notify => Exec["exec-BBB"], } exec { "exec-BBB":
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 =
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 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 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 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 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
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
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
2017 Apr 12
2
CELT CFFT size configuration
Dear all, Sorry for this simple and maybe stupid question, I'm working in the implementation of opus for ARMv7e microcontroller using a library CMSIS/DSP used to calculate the CFFT and MDCT based on the DCT-IV. my question is: In the implementation of Celt you have used a fixed length CFFT equal to 1920, I want to know if there is some issues which can appear if a change that configuration
2017 Apr 11
2
MDCT implementation and his overlapped relationship
Dear all I'm working on the implementation of the MDCT for the processor ARM-Cortex-M4 I'm trying to replicate the behavior of the MDCT for several overlapped values however I realized that current implementation of the MDCT is very close to the theory only in case in which we have and overlap exactly equal to N/2 where N is the size of the input vector as is shown in the examples for
2017 Apr 18
2
Optimization points
Dear all, Currently I'm working in and optimization of opus for an arm-architecture *"armv7e-m"* I've involved in the general opus documentation as well in the architecture, however opus Is so big and difficult to discover specific optimization points, I want to know if you could give me a general view about of the principal points that I have to consider in order to optimize
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 Oct 21
1
use regex to ensure multiple directories are absent or exist
Is it possible to use regex to ensure directories are deleted..... I want to be able to do something like: file { ''/var/directory[1-9]'': ensure => absent, } Would also be nice to use regex to ensure directories are present... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web
2013 Sep 10
1
Próxima reunión del "Grupo de Usuarios de R de Madrid - 26-Septiembre"....
Hola, El próximo 26-septiembre comenzamos la nueva temporada de reuniones del "Grupo de Usuarios de R de Madrid". Esta temporada trae algunas novedades, una de ellas es que intercambiaremos el lugar de las reuniones entre la Facultad de Ciencias de la UNED y ahora el bar S10 en el que esperamos mantener unas reuniones más próximas y si cabe informales. Por ahora tenemos un par de