Hi Team, I am using with_togather so i have two list one is mserver and other is domain, problem is i want to pass same mserver two times in the list ,but it is giving error and using only last defined value.
My requirement is for mserver list this can be same mserver or sometimes different mservers - name: Login to Checkpoint Management Server uri: url: "https://{{item.0}}/web_api/login" validate_certs: False method: POST body: user: "{{ mserver_username }}" password: "{{ mserver_password }}" domain: "{{item.1}}" body_format: json register: login failed_when: False when: item.0 != "" and item.1 != "" mserver: {10,10,10,10, 10.10.10.10, 20.20.20.20} doamin:{9.9.9.9,8.8.8.8,7.7.7.7} and i want execute like when mserver 10.10.10.10 then domain is 9.9.9.9 and again mserver is 10.10.10.10 and domain is 8.8.8.8 so on. and this two list mserver and domain I will get dynamically. my playboolk tasks: - include_role: name: validateip when: object_type == "ip" with_together: - "{{ mserver }}" - "{{ domain }}" and in this role there are multiple tasks like login ,validation and logout I am performing for ex login playbook - name: Login to Checkpoint Management Server uri: url: "https://{{item.0}}/web_api/login" validate_certs: False method: POST body: user: "{{username }}" password: "{{ password }}" domain: "{{item.1}}" body_format: json register: login failed_when: False when: item.0 != "" and item.1 != "" please help how to pass same values in list. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ae0b56c0-8091-4a2b-a133-6f7ce057570ao%40googlegroups.com.