O'Reilly logo

Ansible Configuration Management - Second Edition by Daniel Hall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Windows playbook modules

Windows support is new to Ansible and as such, there aren't many modules available for it. Modules that are windows only are named beginning with win_. There are also a few modules available, which work on both Windows and Unix systems such as the slurp module, which we covered earlier.

Extra care should be taken in Windows modules to quote the path strings. Backslashes are an important character in both YAML, where they escape characters and in windows paths, where they denote directories. Because of this, YAML might confuse parts of our paths for escape sequences. To prevent this, we use single quotes on our strings. Additionally, if our path is a directory itself, we should leave off the trailing backspace so that YAML ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required