Forum Discussion
amintej
Sep 05, 2018Cirrus
Hello,
One questions, why are not using the module bigip_pool_member?
- name: ADD POOL MEMBER
bigip_pool_member:
state: present
server: "{{ f5_server }}"
user: "{{ f5_user }}"
password: "{{ f5_pass }}"
partition: "{{ f5_partition }}"
pool: "{{ f5_pool_name }}"
host: "{{ item.f5_node_host }}"
name: "{{ item.f5_node_name }}"
port: "{{ f5_pool_port }}"
validate_certs: no
delegate_to: localhost
with_items: "{{ f5_nodes_list }}"
You can use "with items" for looping and define a list with the nodes, example fo f5_nodes_list:
f5_nodes_list:
- f5_node_name: test_ansible-1
f5_node_host: 1.1.1.3
- f5_node_name: test_ansible-2
f5_node_host: 1.1.1.4