Hi,
I develop a security module for adding firewall rules irrespective of OS centos 6/centos7 or Ubuntu.But for ubuntu user i am try to give some warning using " from ansible.utils.display import Display" module in ansible-2.0. But on running the module using ansible I am getting below error:
from ansible.utils.display import Display\r\nImportError: No module named ansible.utils.display\r\n", “parsed”: false}
Whereas I am able to import and display warning in python directly:
Python 2.7.5 (default, Jun 24 2015, 00:41:19)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
from ansible.utils.display import Display
d=Display()
d.warning(“hi”)
[WARNING]: hi
Can anyone know the issue, so that I can add the warning in my module.
thanks in advance for Quick help