[j-nsp] Ansible juniper_junos -add license module?

adamv0025 at netconsultings.com adamv0025 at netconsultings.com
Wed Mar 28 06:28:32 EDT 2018


The problem is I need to hit enter after the license is passed and then also
^D (ctrl+D) at the end and I'm not sure how would I go about doing that in
junos_command. 

So I tried to do it with the "shell:" basically creating expect script -that
adds the license but I can't successfully exit. 
-it just hangs there even though I send commands to exit the router and I
even use "exit 0" at the end. 

So I ended up calling a python script :)
-adjusted a script I'm using to paste base staging config -as once again I
could not find any juniper_junos module for amnesiac mode. (all the modules
kind of assume working ssh and netconf).

Thanks folks for all the suggestions,    

adam 

netconsultings.com
::carrier-class solutions for the telecommunications industry::

> -----Original Message-----
> From: juniper-nsp [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf
> Of Nitzan Tzelniker
> Sent: Wednesday, March 28, 2018 12:57 AM
> To: jean at unistra.fr
> Cc: juniper-nsp at puck.nether.net
> Subject: Re: [j-nsp] Ansible juniper_junos -add license module?
> 
> I dont think rpc will be good option as the command "request system
license
> add " dose not have rpc May be junos_command will do it but I am not sure
> 
> user at switch> request system license add  jj | display xml rpc <rpc-reply
> xmlns:junos="http://xml.juniper.net/junos/17.3R2/junos">
>     <message>
>         xml rpc equivalent of this command is not available.
>     </message>
>     <cli>
>         <banner>{master:0}</banner>
>     </cli>
> </rpc-reply>
> 
> Nitzan
> 
> 
> On Mon, Mar 26, 2018 at 2:51 PM Jean Benoit <jean at unistra.fr> wrote:
> 
> > On Sun, Mar 25, 2018 at 03:59:14PM +0100,
> adamv0025 at netconsultings.com
> > wrote:
> > > [...]
> > > If not how can I send ^D (ctrl+D a.k.a end of file) in expect script
> > please?
> >
> >
> >         # ASCII 4: EOT (end of transmission)
> >         set ctrlD \004
> >
> >         send $ctrlD
> >
> > --
> > Jean
> > _______________________________________________
> > juniper-nsp mailing list juniper-nsp at puck.nether.net
> > https://puck.nether.net/mailman/listinfo/juniper-nsp
> >
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp



More information about the juniper-nsp mailing list