Writing your playbooks
Once your modules are configured, and all requirements (be they Python module dependencies or device software ones) are met, it's time to start writing your playbook. This should be a simple task of following the documentation for the module. Let's suppose we want to reset the configuration on an F5 BIG-IP device. From the documentation, we can see that authentication parameters are passed to the module itself. Also, the example code shows the use of the delegate_to task keyword; both of these clues tell us that the module is not using the native SSH transport of Ansible, but rather one that is defined in the module itself. Thus, a playbook to reset the configuration of a single device might look something like this: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access