Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to banner ansible #131

Open
cyrmoon opened this issue Jun 29, 2021 · 2 comments
Open

how to banner ansible #131

cyrmoon opened this issue Jun 29, 2021 · 2 comments

Comments

@cyrmoon
Copy link

cyrmoon commented Jun 29, 2021

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 ?

@alagoutte
Copy link
Contributor

I think yes, you do have try to escape # ( for example #)

Ansible think # is a comment...

@tchiapuziowong
Copy link
Member

Hello! I replied to your issue here: aruba/aos-switch-ansible-collection#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants