Hello All,
Anybody can help for the below error. My system was patched recently and
ansible version has been upgraded to 2.9.
After that my playbook started to throw below error.:
=========================
fatal: [vlac475.netpost]: FAILED! => {"msg": "The conditional check
'ansible_default_ipv4.network|match( bpost_mgmt_network )' failed. The
error was: template error while templating string: no filter named 'match'.
String: {% if ansible_default_ipv4.network|match( bpost_mgmt_network ) %}
True {% else %} False {% endif %}\n\nThe error appears to be in
'/root/playbooks/roles/bpost_facts/tasks/main.yml': line 19, column 3, but
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n# Server has multiple interface but
primary is mgmt\n- name: set fact bpost_has_backup_nic to 'false' if no
interface matching bpost mgmt subnet\n ^ here\n"}
=========================
Task syntax:
# Server has multiple nic. primary is neither mgmt nor DMZ. Configured IP
match backup network.
- name: set fact Detrio_has_backup_nic to 'true'
set_fact:
Detrio_has_backup_nic: true
when:
- ansible_{{ Detrio_backup_nic}}.ipv4.network|*match*(
Detrio_backup_network )
- _has_backup_nic is undefined
- Detrio_backup_nic is defined
If any body can help to modify the syntax or what the new filter for match
in 2.9 will be appreciable.
Thanks & Regards,
Devesh Kumar SIngh
--
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/d93b3cf3-f8f4-4168-b606-efdd4f3d4e90%40googlegroups.com.