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

file with extention *.set is not converted to xml and raises error on the shell #54

Closed
ramelito opened this issue Feb 11, 2015 · 1 comment

Comments

@ramelito
Copy link

Here what i am trying to implement, simple playbook
tasks:
- name: installing initial config to Amnesiac
junos_install_config:
host={{ inventory_hostname }}
user=root
console="--telnet={{TERMSERV}},{{TERMSERVPORT}}"
file=configs/initial.set
overwrite=yes
savedir=junos/inventory
logfile=junos/logs/initial.log

config is also very basic
set system root-authentication encrypted-password $1$usi5OLHO$2//owSkqcLsuwRb9hSeTI.
set interfaces ge-0/0/0 unit 0 family inet address 192.168.159.7/24
set system host-name router
set system time-zone GMT-3
set system services netconf ssh
set routing-options static route 0.0.0.0/0 next-hop 192.168.159.254
delete security
delete system services web-management

starting this playbook lead to ansible execution and at the task processing it just hangs
PLAY [servers] ****************************************************************

TASK: [installing initial config to Amnesiac] *********************************
^CERROR: interrupted

wireshark shows me smth interesting

...............
.........

XXXhostnameXXX (ttyd0)

login: root
root

--- JUNOS 12.1X46-D20.5 built 2014-05-14 20:38:10 UTC

.[3g.[24;9H.H.[24;17H.H.[24;25H.H.[24;33H.H.[24;41H.H.[24;49H.H.[24;57H.H.[24;65H.H.[24;73H.H

root@XXXhostnameXXX% xml-mode netconf need-trailer
xml-mode netconf need-trailer

urn:ietf:params:xml:ns:netconf:base:1.0 urn:ietf:params:xml:ns:netconf:capability:candidate:1.0 urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0 urn:ietf:params:xml:ns:netconf:capability:validate:1.0 urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file http://xml.juniper.net/netconf/junos/1.0 http://xml.juniper.net/dmi/system/1.0 1323 ]]>]]> set system root-authentication encrypted-password $1$usi5OLHO$2//owSkqcLsuwRb9hSeTI. set interfaces ge-0/0/0 unit 0 family inet address 192.168.159.7/24 set system host-name router set system time-zone GMT-3 set system services netconf ssh set routing-options static route 0.0.0.0/0 next-hop 192.168.159.254 delete security delete system services web-management

when i tried manually do what script is supposed to i got an error
XXXhostnameXXX (ttyd0)

login: root

--- JUNOS 12.1X46-D20.5 built 2014-05-14 20:38:10 UTC
root@XXXhostnameXXX% xml-mode netconf need-trailer

urn:ietf:params:xml:ns:netconf:base:1.0 urn:ietf:params:xml:ns:netconf:capability:candidate:1.0 urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0 urn:ietf:params:xml:ns:netconf:capability:validate:1.0 urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file http://xml.juniper.net/netconf/junos/1.0 http://xml.juniper.net/dmi/system/1.0 1278 ]]>]]> error set syntax error

so it seems to me the problem is in right formatting of *.set file
i did not test with *.conf and *.xml files

@shermdog
Copy link
Contributor

Hi @ramelito

When using console mode the only supported format is text (curly brace).

The underlying console framework would need to be updated to support this. If that is a feature you require please open an issue there. https://github.com/Juniper/py-junos-netconify/issues

Thanks,
-Rick

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

2 participants