Hey Vince, the $::aio_agent_version fact only exists on Puppet 4.  So, I've 
used its existence in the past to determine whether to use a Puppet 3 or 4 
code block.  Just wrap your Puppet 4 code block in a conditional that 
checks for the existence of the fact.

HTH,
Gabe

On Thursday, January 5, 2017 at 9:10:52 AM UTC-8, Vince Skahan wrote:
>
> On Thursday, January 5, 2017 at 3:49:54 AM UTC-8, Martin Alfke wrote: 
>
>> You can use the fact puppetversion in you rmanifests. 
>>
>> if versioncmp(‘3’, $::puppetversion) < 0 { 
>>   # puppet 4 
>> } else { 
>>   # puppet 3 
>> } 
>>
>>
> There is no such fact on a PE 2016.4.2 client or server:
>
> aio_agent_version => 1.7.1
> augeas => {
>   version => "1.4.0"
> }
> facterversion => 3.4.1
>
>
> There is different stuff on a PE 3.7.2 server and client:
>
> augeasversion => 1.2.0
> facterversion => 2.2.0
> puppetversion => 3.7.2 (Puppet Enterprise 3.7.0)
>
>
> Only thing I can think of is looking for puppetversion, and if it's there 
> strip off everthing and see if it starts with a '3', but heaven knows what 
> crazy versioning semantics PuppetLabs will throw at us looking forward, so 
> I don't know if that'll be a stable way to do it or not....
>
>
>

-- 
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/a18ed67e-9fb7-4f45-a768-5e70470a2c41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to