Has anyone managed to do this? I've been using a lot of the new ansible network modules but have ran into a snag trying to configure an exec banner. Looking at accounting logs I see Ansible login, pass the command " banner exec Z",and then it just does nothing and Ansible times out. I'm assuming this is due to how the banner is configured using start/stop delimiters, but not sure how to work around it.
I'm using ios_template with a simple banner.j2 template:
banner exec Z
This is a test banner
Zbanner exec Z this works but is ugly ZNOTICE: The information contained in this email may be confidential, proprietary and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please reply to the sender and destroy all copies of the message. Thank you.