Hi,
I've some misunderstanding regarding conditionals on variables or number.
By example, within a role we're using some prompt to defined some variables.

-name: "server_domain"
 prompt: "Choose server?\n1- Server1\n2- Server2\n3..."
 default: "1"
 private: no

In another role, we'll defined variables regarding this response.

-name: "Server"
 set_fact: 
    domain: "{{ 'local.com'}}"
 when: server_domain == 1

It doesn't run but it's seems to run when I write 
when: server_domain == "1"
It's a number and not a variable. So, is it right?
Could you please explain me what is the correct way?

Best regards, H

    

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a510adfa-014e-48ab-b5a7-70f2d4088e9bn%40googlegroups.com.

Reply via email to