Forum Discussion
How to address multiple BIG-IP servers in one Ansible task?
- Mar 28, 2019
Resolved: the answer is to use the "inventory_hostname" variable like this:
tasks: - name: Create app1 server pool bigip_pool: name: app1_pl monitors: "/Common/http" lb_method: round-robin password: "adminpassword" server: "{{inventory_hostname}}" user: "adminuser" validate_certs: no delegate_to: localhost
This will cause Ansible to loop through the servers in the inventory/hosts group that we pass it. In my case the group is called "f5lab".
Resolved: the answer is to use the "inventory_hostname" variable like this:
tasks:
- name: Create app1 server pool
bigip_pool:
name: app1_pl
monitors: "/Common/http"
lb_method: round-robin
password: "adminpassword"
server: "{{inventory_hostname}}"
user: "adminuser"
validate_certs: no
delegate_to: localhost
This will cause Ansible to loop through the servers in the inventory/hosts group that we pass it. In my case the group is called "f5lab".
- NisargDec 18, 2021Nimbostratus
Hello,
I am
l looking for a help on similar issue. Trying to manage 2 BIG IP Server and tried your method mentioned above. However I am getting an errors.
Regards,
Nisarg S
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