Forum Discussion
Run Ansible Playbook based on the Redundancy State.
You may have already figured it out based on previous comments, but for posterity, below is an example of using the failover_state bigip fact as a condition for performing a task which is hopefully what you were after. The bigip_node task in this playbook contains a when statement so it only runs when the value of the failover_state fact is HA_STATE_ACTIVE; therefore, the task runs on the active device and not the standby. As you probably know if you create sync'able objects on all devices in the DG with a playbook you'll encounter a change conflict between the DG members. This playbook avoids that.
Update: Removing my example and instead pointing to:
K10531487: Running Ansible tasks on the active BIG-IP in a device group
Which AskF5 has published based on this Q&A. They've done this for other Q&As on DC as well.
This article contains more detailed instructions for creating this playbook and you can leave feedback at the bottom of the page.
That error does not appear to be specific to F5 Ansible modules. Looks like an error that occurs when Ansible can't find the module due to a naming conflict. The following issues offer clues:
Does running the playbook with high verbosity, the -vvvv flag, give you more details about the error?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com