Re: [ansible-project] Conditional wild card usage

2020-07-07 Thread Vladimir Botka
On Tue, 7 Jul 2020 12:46:07 -0700 (PDT) sandeep athoti wrote: > when: ansible_distribution_major_version|int == 6 or ansible_fqdn == > "test[0-1][0-9].example.com" See "Testing strings" https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-strings For example - hos

[ansible-project] Conditional wild card usage

2020-07-07 Thread sandeep athoti
Is there any way I can use the wild cards or regex in when statements, when: ansible_distribution_major_version|int == 6 or ansible_fqdn == "test[0-1][0-9].example.com" I actually do not want to pass hostname of my server in vars section. Will this regex work with in conjunction with Ansibl