If a user tries to write manifests that work correctly on both x86 and x64 Windows, when file system redirection is enabled (x86) and not (x64), they need to be able to conditionally define file resources. For example, on x86:
And on x64:
Unfortunately, you can't use sysnative for both x86 and x64, it's only available when filesystem redirection is enabled.
In order to make this conditional, manifest authors need to be able to select on a fact value. We cannot use the architecture fact, since that is the architecture of the operating system, and not the architecture of the ruby process.
One option is to look at the RUBY_PLATFORM constant which returns on x86:
A work around would be to look for "(x86)" in the path fact, though it's not guaranteed to correctly identify the ruby architecture.
This issue is somewhat mitigated by:
- 2008R2 and up are only 64-bit operating systems. Only consumer versions (windows 7, 8, etc) and earlier server versions (2003, 2003R2, and 2008) support 32-bit versions.
- Puppet x64 is not supported on 2003