September 2018
Beginner to intermediate
214 pages
5h 53m
English
Ansible offers a few modules that allow you to run commands to be executed as they are in the remote hosts. This is handy when the Ansible modules do not cover the task that is intended to be performed, which is especially the case when there are complex tasks.
The issue with command modules is that they do not know whether the task has been properly executed since they can execute any command running any tool, service, and system. The return values for a command can easily be misunderstood and sometimes do not reflect what really happened after the command execution. It is recommended that you use the changed_when option in the task in the playbook, so it looks as follows:
- name: Execute a Windows Write ...
Read now
Unlock full access