Open cyrmoon opened 3 years ago
Hi ,I try to add a banner at my aruba os-switch 2930m witch ansible; here my tasks in ansible: here my playbook :
hosts: all gather_facts: False collections: aos_switches vars: ansible_connection: network_cli ansible_network_os: arubaoss config: create tasks: name: ajout banner arubaoss_config: lines: - banner motd ^######################################################################### Vous entrez dans un espace securise du systeme d information. Assurez vous d avoir les autorisations necessaires #########################################################################^ name: sh banner arubaoss_command: commands: [ ' show banner motd '] register: banniere debug: msg: "{{banniere}}"
i have the error : TASK [ajout banner] ***** fatal: [switch1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "command": "banner motd ^ Vous entrez dans un espace securise du systeme d information ^", "msg": ";1Hrmation ^Invalid input: Vous\r\neee(config)# ", "rc": -32603}
the problem is a format problem after banner motd ?
I think yes, you do have try to escape # ( for example #)
Ansible think # is a comment...
Hello! I replied to your issue here: https://github.com/aruba/aos-switch-ansible-collection/issues/11
Hi ,I try to add a banner at my aruba os-switch 2930m witch ansible; here my tasks in ansible: here my playbook :
i have the error : TASK [ajout banner] ***** fatal: [switch1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "command": "banner motd ^ Vous entrez dans un espace securise du systeme d information ^", "msg": ";1Hrmation ^Invalid input: Vous\r\neee(config)# ", "rc": -32603}
the problem is a format problem after banner motd ?