Thank you

On Friday, November 21, 2014 1:41:16 PM UTC-5, Zachary Stern wrote:
>
> If you have a fact called factA and a fact called factB, and you need 
> factC to be a combination of both values, sure, that can be done.
>
> I don't know what version of Facter you're using, but if you're using PE 
> 3.7 + Facter 2.2.0, you can simply use Facter.value.
>
> E.g:
>
> Facter.add(:factC) do
>   setcode do
>     factC = "#{Facter.value('factA')}#{Facter.value('factB')}"
>     factC
>   end
> end
>
> That would return a factC that was the combined values of factA and factB.
>
> For more, see the docs 
> https://docs.puppetlabs.com/facter/2.2/custom_facts.html#using-other-facts
>
> You could of course just combine the fact values in your puppet code as 
> well, if that's appropriate...
>
> `$value = "${one}${two}"` is perfectly valid Puppet code.
>
> On Friday, November 21, 2014 6:40:44 AM UTC-8, Spriya wrote:
>>
>>
>> Hi,
>>
>> The purpose  is i want to compare using the value to a txt file which 
>> contains 1.7.0_72//u01/java/jdk1.7.0_72/jre/bin/java this reason for 
>> that i want to concatenate.
>>
>> Let me know your thoughts
>> On Friday, November 21, 2014 8:58:53 AM UTC-5, jcbollinger wrote:
>>>
>>>
>>>
>>> On Thursday, November 20, 2014 12:21:09 PM UTC-6, Spriya wrote:
>>>>
>>>> Hi ,
>>>>
>>>> Is there any way to merge two facts into single facts.
>>>>
>>>> Here is my facts
>>>> java_known_weblogic_version11.7.0_72java_known_weblogic_version1_path
>>>> /u01/java/jdk1.7.0_72/jre/bin/java
>>>>
>>>> I want to merge these two facts into single one 
>>>>
>>>> I mean 
>>>>
>>>> java_known_weblogic_version1 = 1.7.0_72/
>>>> /u01/java/jdk1.7.0_72/jre/bin/java
>>>>
>>>> Like this
>>>>
>>>> Anyone please help me
>>>>
>>>
>>>
>>> In what context, for what purpose?
>>>
>>> Generally speaking, I'd say you should just concatenate the two fact 
>>> values in the scope where the aggregate value is wanted, as opposed to 
>>> modifying fact implementations to change what facter reports.  Is that 
>>> unsuitable for some reason?
>>>
>>>
>>> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1e2a786a-e735-440e-9532-4d0142f08313%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to