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:[email protected]] On Behalf > Of Nitzan Tzelniker > Sent: Wednesday, March 28, 2018 12:57 AM > To: [email protected] > Cc: [email protected] > 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@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 <[email protected]> wrote: > > > On Sun, Mar 25, 2018 at 03:59:14PM +0100, > [email protected] > > 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 [email protected] > > https://puck.nether.net/mailman/listinfo/juniper-nsp > > > _______________________________________________ > juniper-nsp mailing list [email protected] > https://puck.nether.net/mailman/listinfo/juniper-nsp _______________________________________________ juniper-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/juniper-nsp

