Ask Your Question

fact to setup Hiera yaml specific to Windows and Unix

asked 2015-03-13 15:46:09 -0600

sheshi gravatar image

Hi All,

Is there a fact that I can use to determine between Unix and Windows platform? I want to use this fact and setup Hiera hierarchy so that Hiera lookup with get the right values depending on whether a node is a Windows or Unix system.


:hierarchy: - defaults - %{::platform}

I can then have windows.yaml and/or unix.yaml to setup Hiera data.



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-13 18:19:50 -0600

lavaman gravatar image

I believe you're looking for the kernel fact:

edit flag offensive delete link more


I am not sure if kernel is the right fact. For Unix flavors, it returns different value for each type (e.g., Linux for Linux variants). I just need a fact to differentiate between Windows and Unix.

sheshi gravatar imagesheshi ( 2015-03-13 18:37:30 -0600 )edit

Then you probably want osfamily

lavaman gravatar imagelavaman ( 2015-04-03 16:55:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-13 15:46:09 -0600

Seen: 209 times

Last updated: Mar 13 '15