Yes, therefore we use stdlib 3.2.0.

Christian

Am Dienstag, 11. Juni 2013 14:53:50 UTC+2 schrieb jcbollinger:
>
>
>
> On Tuesday, June 11, 2013 1:10:16 AM UTC-5, c!w wrote:
>>
>> Hi all,
>> I have a tricky problem where I need your support. We use the regsubst 
>> function in one of our manifests to extract certain information from the 
>> fqdn. That code is running in production since months and does extactly 
>> what it should.
>>
>> 7:  $customer = upcase(regsubst($::fqdn, '(^[^-]*)-[^-]*.*', "\\1"))
>> 8:  $environment = upcase(regsubst($::hostname, '^[^-]*-([^-]*).*', 
>> "\\1"))
>> 9:  $product = upcase(regsubst($::hostname, '^[^-]*-[^-]*-([^\.1-9]*).*', 
>> "\\1"))
>>
>> Last week I discovered the stdlib module from PuppetLabs and gave it a 
>> try. Really nice functions, and I used them of course for my next module. 
>> But since then it looks like the regsubst function is not working anymore.
>>
>> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
>> Function 'regsubst' does not return a value at 
>> /etc/puppet/environments/dev_foo/modules/auth/manifests/hosting.pp:7 on 
>> node unic-dev-foo.p.unic24.net
>>
>> It even fails when I run puppet against a environment without the stdlib 
>> module, which confuses me most.
>>
>
>
> That part confuses me least.  Puppet does not segregate custom functions 
> or types  based on environment.  If one of the stdlib native components is 
> somehow breaking regsubst(), then it is to be expected that it would be 
> seen in all environments.
>
>  
>
>> Does anybody of you have an idea, why that code now fails? We use 
>> Puppet 2.7.18.
>>
>>
>
> And what version of stdlib did you install?  Support for Puppet 2.7 was 
> dropped as of stdlib 4.0.0.  (Current is 4.1.0; see 
> https://forge.puppetlabs.com/puppetlabs/stdlib.)  Like most other things 
> Puppet, stdlib moves fairly quickly, so stdlib 3 isn't actually all that 
> old.
>
>
> John
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to