Closed salfers closed 5 months ago
So I've been beating my head on why my Execution Environment upgrade of versions broke all of my juniper playbooks.
I was tired of all the vulnerability scans the base quay.io ansible runner image (no updates in 2 years) had and the lengths I had to go to to make it current enough to pass scans. I then realized v1 is depreciated for v3. v3 is a bit more of a headache to build with.
What best I could come up with is the following.
The role juniper.junos
may be depreciated (no updates in 3 years).
I then tried to use the other juniper collections like junipernetworks.device
and that one has various issues like this as well. It does appear to get updates.
I then tried the other juniper collection juniper.device
. It didnt play well with the now required connection: ansible.netommon.netconf
however it worked like a charm with connection: local
(again, something that is supposedly going away).
I now sit here aggrivated that I will have to go through this all over again as this stuff depreciates. Why they stopped updating the "defacto" EE image I dont know.. Why Juniper has multiple galaxy roles and collections.. I dont know.. But this was the only workaround I found for this. Which means I now get to refactor a truckload of ansible playbooks with these changes..
@GiuffreLab I'm trying to understand what other collections does Juniper has? In Ansible Galaxy, under the official Juniper namespace, there are 2 collections. The main one [device](https://galaxy.ansible.com/ui/repo/published/juniper/device/)
and another empty one.
Probably many other collections belong to other people and not Juniper.
@madalinignisca It's trivially easy to search (or just reading what I put in the reply), but the main ones would be these.
Collections https://galaxy.ansible.com/ui/repo/published/juniper/device/
https://galaxy.ansible.com/ui/repo/published/junipernetworks/junos/
Roles https://galaxy.ansible.com/ui/standalone/roles/juniper/junos/documentation/
@GiuffreLab
https://galaxy.ansible.com/ui/repo/published/junipernetworks/junos/ - this is part of Ansible community, not official Juniper effort.
The Role from Juniper has been deprecated, should work with some devices and older Juneos versions.
I'm not affiliated to Juniper, but it was very easy to understand all this information from all the repositories and their docs.
Maybe you should limit the issue only to error.
But from your description you are not using juniper.device collection, which is this repository. You are using the Ansible Community junipernetworks.junos which is for old Juniper devices, and it is maintained by Ansible.
@madalinignisca please... just actually READ what this thread is talking about. Just read it.
Everything you said... WE KNOW!
We're trying to point out, that with these collections or roles, you CANNOT use Ansible's recommended ansible.netcommon.netconf
or network.cli
as the connection type. You can only use local
for the connection because it is not passing required arguments. That's it.. That's what this thread is about.
Could you use the Ansible collection instead of the Ansible role to run the playbook and let me know the result?
https://galaxy.ansible.com/ui/repo/published/juniper/device/
Sample playbook for juniper.device ansible collection mentioned below https://github.com/Juniper/ansible-junos-stdlib/tree/master/Samples
Could you use the Ansible collection instead of the Ansible role to run the playbook and let me know the result?
https://galaxy.ansible.com/ui/repo/published/juniper/device/
Sample playbook for juniper.device ansible collection mentioned below https://github.com/Juniper/ansible-junos-stdlib/tree/master/Samples
As previously mentioned, multiple times. The juniper.device
collection is the only one that works. HOWEVER, it only works with connection: local
as mentioned.
Your link of test scripts ALL use connection: local
, hence the entire point of the issue, as connection: ansible.netcommon.netconf
or connection: network.cli
do not pass properly.
Without the local connection, all tasks fail due to missing facts like credentials and so on.
juniper.device
ansible collection supports local
and juniper.device.pyez
.
In case, If you want to use ansible.netcommon.netconf
and network.cli connection
, you need to install core ansible
junipernetworks.junos
collection and use core ansible playbook.
https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html https://docs.ansible.com/ansible/latest/collections/junipernetworks/junos/index.html
Fixed #664
Issue Type
Module Name
for example
juniper_junos_facts
OS / Environment
n/a
Summary
After upgrading to ansible 2.15.9 or any version newer than 2.16.2 all junos related modules no longer work. The error message complains about "missing required arguments".
Steps to reproduce
Expected results
Actual results