Forum Discussion
PG0581
Cirrus
Aug 29, 2018Ansible - Looping vars_prompt question to create LTM pool
I'm trying to create a playbook to create a pool, and the variables of the pool configuration are provided by the user.
I have it working configuring just one pool member, but in most cases, there...
amintej
Cirrus
Sep 05, 2018Hello,
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects