This is a tag created for questions which may fall under the automation category of Junos. Junos is the OS that runs on Juniper Networks routers.
Questions tagged [junos-automation]
58 questions
1
vote
2 answers
Ansible - Unable to run certain JUNOS modules
I'm trying to run the Ansible modules junos_cli and junos_rollback and I get the following error:
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in…

Quake
- 105
- 1
- 10
1
vote
1 answer
junos_command module not returning output
I have an Ansible script where i am simply using junos_command module to get users list from Juniper switch, below is the snippet of my code. I keep getting the RuntimeWarning whenever i try to run this. Moreover I have been successfully able to run…

Manu
- 11
- 3
0
votes
0 answers
How to make a junos vcp boot in shell mode?
Is there a way in which you could make a junos vcp boot in shell mode instead of operational mode?

doppelganger82
- 1
- 1
0
votes
1 answer
How can you pass regex to Junipers match command?
I'm looking to limit the returned data from a Juniper switch in Ansible and I don't see to be able to get the match command passed across to the device.
On the device I can run;
show vlans | match "(\d+)"
This returns a list of all active vlans on…

PacketLoss
- 5,561
- 1
- 9
- 27
0
votes
0 answers
Ansible & Juniper Junos - Unable to make a PyEZ connection: ConnectError()
I have my inventory.ini, playbook called checklist.yml, and ansible.cfg.
I use VS code and I have the extension "remote - ssh" to connect to the network script server. Then I git pull from the script server and run ansible-playbook…

Jason Ui
- 1
- 1
0
votes
0 answers
Python test on external SSH conection via Junos PYEZ
I am in a project where I have to automate some tasks and for this the program must connect via SSH to some routers. My question is, how should I test this function? How can i simulate the ssh connection to the router and probe scenarios?
the…

ehidoz
- 21
- 5
0
votes
1 answer
How to use ansible to switch vlans on a Juniper Switch
I am using a variant of the example provided junipernetworks.junos.junos_l2_interfaces – L2 interfaces resource module
My playbook
- name: Switch VLAN
hosts: all
connection: local
tasks:
- name: Replace VLAN
…

dranobob
- 796
- 1
- 5
- 19
0
votes
1 answer
json_query filter with bug?
I have a situation.
When I try to use json_query filter in ansible-playbook return this error:
{"msg": "Error in jmespath.search in json_query filter plugin:\ninvalid literal for int() with base 10: '-'"}
I solve this with replace ('-','_')…
0
votes
1 answer
Ansible Juniper.Device collection : 'JuniperJunosModule' object has no attribute 'conn_type'
I have a huge headache on this issue and can't figure out how to deal with it. I have a simple playbook where I try to upload a firmware and new conf to a Juniper switch.
---
- name: Juniper Playbook
hosts: junos
gather_facts: no
collections:
…

a-maxime
- 35
- 3
0
votes
1 answer
How can I get log messages from a juniper switch to get processed by the ELK stack using filebeat?
I apologize in advanced as I am fairly new to using stack overflow. Please let me know if I need to change anything with my question.
I am currently trying to set up a log aggregator for my work. My plan is to use the elastic stack and filebeat to…

Charles Hartman
- 13
- 3
0
votes
1 answer
Juniper PyEZ ephemeral database send RPC
I want to send some "raw" RPC commands
For example;
eph1
]]>]]>
im a bit baffled on how to do that, any thoughts?

Neil Bernard
- 131
- 2
- 9
0
votes
1 answer
Could not link driver rlm_sql_mysql
I have a problem with MySQL:
freeradius -X gives the following command:
Could not link driver rlm_sql_mysql: /usr/lib/freeradius/rlm_sql_mysql.so: cannot open shared object file: No such file or directory
Make sure it (and all its dependent…

Krisz
- 1
- 1
- 2
0
votes
1 answer
Python 3, Tkinter GUI, Juniper Switch DevOps task
I've been doing python for around 3 weeks now so very new to it. Don't judge me on my code! :)
I have made an app to enable basic network ops functions to be performed at the click of a button, tasks like:
Disable/ Enable interface
Disable/ Enable…

Ryan
- 21
- 2
0
votes
2 answers
Ansible Unable to Ping
I am trying to teach myself ansible, and I'm struggling to get things working properly. I currently have a lab spun up on Eve-NG so I can play around with some stuff before I start using this on a live network. The IP of the host (a virtual Juniper…
0
votes
1 answer
How to get extract xml data and print debug msg
I am trying to extract 2 elements (l2-mac-address and l2-mac-logical-interface) via xpath and have them print as "mac-address: interface"
XML:
…

clang
- 3
- 2