variable's declarations

18 views
Skip to first unread message

Venkat Eswer

unread,
May 4, 2022, 1:58:45 AMMay 4
to Ansible Development
shall i define variables using conditions in default/main.yml file.

ex : - host1.com
         when: env == 'dev'
       - host2.com
         when: env == 'uat'

quick response greatly appreciated 

Regards
Venkat
Message has been deleted

Anastasios Lisgaras

unread,
May 4, 2022, 8:59:16 AMMay 4
to ansibl...@googlegroups.com
Hello Venkat,

Yes of course, I suggest you take a look here:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html

However, this list is not the proper place for such questions.
I strongly recommend that you send such questions to the
"ansible-project" mailing list.

Reference :
https://docs.ansible.com/ansible/latest/community/communication.html#asking-questions-over-email
> [ -- %< --- snipped -- %< --- ]
>

--
Kind regards,
Anastasios Lisgaras
Open Source Software Engineer.
🔗 Keybase: https://keybase.io/tas_sos
📜 GnuPG Fingerprint: 5003 03E8 CA50 1878 06D9 3AEA FC25 8330 FE34 8E41
🖊️ Use plain text => https://useplaintext.email/
Reply all
Reply to author
Forward
0 new messages