Hi team,
I am calling a list that contains multiple strings, How to put condition in
when statement to match list of strings that matches ansible_hostname
below playbook does not work. please help
ansible_net_hostname: testalpcsr029
vars:
northregion: [ 'alp', alt' ]
playbook:-
name: Configure
ios_config:
commands:
- "{{ item }}"
with_items: "{{ snmp_commands_ap }}"
when:
- "'csr' in ansible_net_hostname or 'asw' in ansible_net_hostname"
- north*region in ansible_net_hostname*
thanks
--
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/1abf8f37-f2ec-430b-a3f3-00db3e7f4bc9%40googlegroups.com.