Code Monkey home page Code Monkey logo

Comments (2)

chidanandpujar avatar chidanandpujar commented on July 25, 2024

Ansible splits the command with "," and creates two separate commands as below and the load of set commands fails with on the device .

        "lines": [
            "set system login message \" *******************************************************************************|1. This computer system and each component thereof is the",
            " sole and exclusive property of Tata Consultancy Services Limited (TCSL) and is intended solely for the usage of its employees and authorized clients.Unauthorized access or use will attract appropriate legal action.2. By usig or accessing this System. you expressly consent to:(a) be bound by all policies and regulations of TCSL.(b) be monitored by TCSL or its agents or representatives while you are using or accessing this System (including any data that is transmitted by you).(c) be liable for any loss that may be suffered by TCSL due to your use and or access of this System and fouryou agree to indemnify TCSL against all such losses.3.If fiveyou do not agree to any of the terms above then do not use and/or access this System.*******************************************************************************|\"\n\n"

from ansible-junos-stdlib.

dineshbaburam91 avatar dineshbaburam91 commented on July 25, 2024

The issue is not seen, I can able to load the same configuration via Ansible playbook.

  tasks:
    - name: commit configuration
      juniper.device.config:
        load: 'set'
        lines:
            - "set system login message \" *******************************************************************************|1. This computer system and each component thereof is, the sole and exclusive property of Tata Consultancy Services Limited (TCSL) and is intended solely for the usage of its employees and authorized clients.Unauthorized access or use will attract appropriate legal action.2. By usig or accessing this System. you expressly consent to:(a) be bound by all policies and regulations of TCSL.(b) be monitored by TCSL or its agents or representatives while you are using or accessing this System (including any data that is transmitted by you).(c) be liable for any loss that may be suffered by TCSL due to your use and or access of this System and fouryou agree to indemnify TCSL against all such losses.3.If fiveyou do not agree to any of the terms above then do not use and/or access this System.*******************************************************************************|\"\n\n"
        diff: True
      register: response
TASK [Print the lines in the config.] ******************************************************************************************************************
ok: [vm1] => {
    "response": {
        "changed": true,
        "diff": {
            "prepared": "\n[edit system]\n+   login {\n+       message \" *******************************************************************************|1. This computer system and each component thereof is, the sole and exclusive property of Tata Consultancy Services Limited (TCSL) and is intended solely for the usage of its employees and authorized clients.Unauthorized access or use will attract appropriate legal action.2. By usig or accessing this System. you expressly consent to:(a) be bound by all policies and regulations of TCSL.(b) be monitored by TCSL or its agents or representatives while you are using or accessing this System (including any data that is transmitted by you).(c) be liable for any loss that may be suffered by TCSL due to your use and or access of this System and fouryou agree to indemnify TCSL against all such losses.3.If fiveyou do not agree to any of the terms above then do not use and/or access this System.*******************************************************************************|\";\n+   }\n"
        },
        "diff_lines": [
            "",
            "[edit system]",
            "+   login {",
            "+       message \" *******************************************************************************|1. This computer system and each component thereof is, the sole and exclusive property of Tata Consultancy Services Limited (TCSL) and is intended solely for the usage of its employees and authorized clients.Unauthorized access or use will attract appropriate legal action.2. By usig or accessing this System. you expressly consent to:(a) be bound by all policies and regulations of TCSL.(b) be monitored by TCSL or its agents or representatives while you are using or accessing this System (including any data that is transmitted by you).(c) be liable for any loss that may be suffered by TCSL due to your use and or access of this System and fouryou agree to indemnify TCSL against all such losses.3.If fiveyou do not agree to any of the terms above then do not use and/or access this System.*******************************************************************************|\";",
            "+   }"
        ],
        "failed": false,
        "msg": "Configuration has been: opened, loaded, checked, diffed, committed, closed."
    }
}
root@# show system login 
message " *******************************************************************************|1. This computer system and each component thereof is, the sole and exclusive property of Tata Consultancy Services Limited (TCSL) and is intended solely for the usage of its employees and authorized clients.Unauthorized access or use will attract appropriate legal action.2. By usig or accessing this System. you expressly consent to:(a) be bound by all policies and regulations of TCSL.(b) be monitored by TCSL or its agents or representatives while you are using or accessing this System (including any data that is transmitted by you).(c) be liable for any loss that may be suffered by TCSL due to your use and or access of this System and fouryou agree to indemnify TCSL against all such losses.3.If fiveyou do not agree to any of the terms above then do not use and/or access this System.*******************************************************************************|";

from ansible-junos-stdlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.