how to pass same variable value multiple times in a list

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.

Could any one please help on it. is there any way how to use same items multiple times in a list . Appreciate your help.

mserver and domain are not lists, lists use as delimiters not { }

Thank You so much Brain.