Deprecation warnings in Ansible 2.8
The warnings
Ansible 2.8 says:
[DEPRECATION WARNING]: evaluating _lldp_interface_enabled as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ _lldp_interface in lldp_interfaces }}
The solution
Change this:
when: _lldp_interface_enabled
to this:
when: _lldp_interface_enabled | bool
Edited by Tomasz Ziółkowski