Closed cardosocristian closed 1 month ago
Hi @cardosocristian , I didn't face any problem when using multiple hosts. My hosts file looks like the following:
[host_grp]
xx.xx.xx.xx ansible_host="xx.xx.xx.xx" f5_user=user f5_password=password
yy.yy.yy.yy ansible_host="yy.yy.yy.yy" f5_user=user f5_password=password
Are you seeing an error in your case? Could you share the error message.
Hi @urohit011 After several tests, I understood how the hosts work in these modules, I did it as follows and it worked.
- name: Set up devices group on multiple hosts
hosts: bigips
connection: local
gather_facts: no
serial: 2
vars:
provider:
password: "{{ f5_password }}"
server: "{{ ansible_host }}"
user: "{{ f5_user }}"
and the hosts file looked like this:
[bigips:children]
f5lb_1
f5lb_2
[f5lb_1]
lb1
lb2
[f5lb_2]
lb1
lb2
I'm starting to use the f5_modules collection and whenever I try to use the ansible_host server field to search for more than one host in the hosts file, I can't use the playbook. The playbook only works correctly if the server field is the F5 I want to connect to. Does this collection support more than one F5 at a time in the playbook?
COMPONENT NAME
Environment
ANSIBLE VERSION