First I'm a sysadmin not a developer I often use ansible to set up things in f5 -ltm i often need to add several hosts to a number of pools. The loadbalancing setup in f5 products in a glance consist of av VIP (virtual server) that is linked to a Pool containing one or more physical servers.
I get stuck in how to set up the loop, i define this first
var_node:
- { host: 1.2.3.4, name:
server1.com }
- { host: 1.2.3.5, name:
server2.com }
var_pool:
- { pool: pool1, port: 80 }
- { pool: pool2, port: 8080 }
- { pool: pool3, port: 443 }
The module ii'm trying to use
- name: add nodes to pools
bigip_pool_members:
provider: "{{ provider }}"
partition: "{{ partition }}"
pool:{{ item.pool }} "here I want to loop var_pool
name: "{{
item.name }} "here I want to loop var_node"
port: "{{ item.port}} "and again ....var_pool"
loop: ?????
I realize I'm probably on a dead end thinking this way any good input from a developer-mind would be extremely appreciated
/Eric