Detecting os in conditional for local action

17 views
Skip to first unread message

Andrew Swerlick

unread,
Jul 1, 2015, 2:02:29 PM7/1/15
to ansible...@googlegroups.com
Is there a way to detect what OS ansible is being run on and to use that information in the condiational for a local_action task?

In particular, I need create a temporary directory on the local machine to fetch a local file into. I'd like to use mktemp, but it behaves differently on Mac OSX vs linux. I'd like one version of the localaction task that runs on Mac's and another for linux.

Brian Coca

unread,
Jul 3, 2015, 10:29:24 PM7/3/15
to ansible...@googlegroups.com
have a play that targets localhost and have it gather facts




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages