Re: [Puppet Users] Prompting fact refresh from Puppet Event

Trevor Vaughan
Thu, 16 Dec 2010 03:53:47 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

No, because I''m not picking the 64 bit version.

Someone else is picking the version and I have to figure out what it is
and "do the right thing", making for extra fun times.

Thanks though,

Trevor

On 12/15/2010 10:12 AM, Felix Frank wrote:
> On 12/15/2010 03:46 PM, Trevor Vaughan wrote:
>> Is is possible to spawn a puppet fact refresh from the completion of an
event?
>>
>> Here''s the scenario:
>>
>> 64-bit system, either a 64 or 32 bit application
''foo'' could be installed.
>>
>> If the 64 bit version is installed, foo.conf needs to be configured
>> with a prepended lib64 path. If not, then the 32bit default is fine.
>>
>> The only thing that I could come up with is a custom fact that returns
>> the architecture of the installed package and then adjust the path
>> based on that.
>>
>> However, this takes *two* puppet runs to complete and I would like to
>> get this down to one run by prompting a fact refresh after the package
>> is installed.
>>
>> Does anyone have any suggestions/techniques?
>
> Hrm, your manifest should be able to handle this one on its own.
>
> Assuming your foo.conf file is part of the foo::config class, add this
> subclass:
> foo::config::arch64bit {
>   File["/etc/foo.conf"] { source => "..." }
> }
>
> Then, at the place in the manifest where you pick the 64bit version of
> the foo application, add an "include foo::config::arch64bit".
>
> Will this work for your manifest?
>
> Cheers,
> Felix
>

- --
Trevor Vaughan
 Vice President, Onyx Point, Inc.
 email: tvaughan@onyxpoint.com
 phone: 410-541-ONYX (6699)
 pgp: 0x6C701E94

- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJNCY1LAAoJECNCGV1OLcypICYIAKwF9TvZNVt8LGY+F4Cw6gzD
dbQrpVORDoJfSxCY7Yxwc9YH8NqBWaQY+A9pMvl13lReHnv3UfJGcjY9ryza6BkP
sFUTuSuhOsKxoMxa5vYh5eny8QXaWSiVren46y7bis1J7qEYtgXJWXntNltNWf1M
e+jZ8A2gUDV63NoO8x4SAAMPPmxugmwQW0H5JjvbERHmtV0j8DPb+xzAMCrsq2JA
/eF+Gl9dtnSKQ1TWwpnyvmarIu9x0SvRX9vA1wzpzAXuqT/ZJxGUNqGg6LYPh5bm
XKtHskZGedf4Qk9CaI+8WOAZSu7iUxMyBOey4ycp0+6Mf0tMJTxL2nRHFnQT89I=K3Pw
-----END PGP SIGNATURE-----