This is what the variable looks like in Ansible. I have to put it all into one line, otherwise the formatting gets all goofy and I get extra spaces (from the actual carriage returns):
banner: "\n***********************************************\nWARNING WARNING WARNING WARNING WARNING\n***********************************************\nThis system is for use of authorized users only.\n\nIndividuals using this computer system without authority, or in excess\nof their normal authority, are subject to having all of their\nactivities on this system monitored and recorded by system management.\n\nIn the course of monitoring individuals improperly using this system,\nor in the course of system maintenance, the activities of authorized\nusers may also be monitored.\n\nAnyone using this system expressly consents to such monitoring and is\nadvised that if such monitoring reveals possible evidence of criminal\nactivity, system personnel may provide the evidence of such monitoring\nto law enforcement officials.\n\n"
If I make it:
banner: "Hi"
It works fine. So, not sure if it's the \n that is causing it, or the length of the message?