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
Z

If I stuff everything on a single line it will work, but that is not the 
behavior I'm looking for:

banner exec Z this works but is ugly Z


The Cisco banner doesn't provide any way to force a new line (via \n or 
similar) and I'm not familiar with any way for Ansible to send a new line 
character as "\n" isn't parsed and is sent as a literal string to the 
router config. I've tried doing this with both ios_command and ios_config, 
but experienced the same timeout behavior for each.





-- 
 

NOTICE: 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.

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7b352a76-839a-431e-9e48-3870204113cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to