I am trying to set_fact value based on condition with if-else ,Below is syntax which I use for the if-else condition . - name: set the server details set_fact: ad_server: "' if ('' == 'westeurope') else '' }}" ad_server_ip: ""
- debug: msg: ",,,"
I have already declared my variable section with the details as mentioned below domain_upper: "AZE.MICHELIN.COM" domain_lower: "aze.michelin.com" server: westeurope: WIN030123 eastus2: WIN100270 server_ip: westeurope: 10.x.x.x eastus2: 10.x.x.x
my if-else condition fails to get the value of if statement and always gets the value of else condition ..Can someone provide me the correct syntax for this situation.
Aucun commentaire:
Enregistrer un commentaire