flow
flow

Reputation: 33

Where in ansible support for windows?

I try write yml for different systems.

in ansuble_os_family and ansible_distribution I don't see Windows. how should I write condition for task for windows?

thanks.

Upvotes: 1

Views: 1842

Answers (2)

Sergi Cañas
Sergi Cañas

Reputation: 33

try with: when: ansible_system == 'Win32NT'

Upvotes: 1

Johannes Müller
Johannes Müller

Reputation: 5661

On a windows machine ansible_os_family should have the value Windows. If this is not the case in your play, there seems to be some error. Maybe you should retest and make sure, you are actually targeting a windows machine.

Upvotes: 3

Related Questions