ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
juniper_junos_software output error
Bug
- Bug Report
Module Name
Juniper.Junos role and Python libraries version
ansible 2.7.0 Juniper.junos=2.1.0
OS / Environment
12.3R12S11, 12.3R12.4,15.1R5.5 Summary
module output error while performing an upgrade (but it works) :
fatal: [switch.prod]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1546420485.07-272815982682903/AnsiballZ_juniper_junos_software.py", line 113, in
Steps to reproduce
ansible-playbook ex2200-firmware-upgrade.yml -i hosts --ask-vault-pass -e "@myvault.yml"
fatal: [switch.prod]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1546420485.07-272815982682903/AnsiballZ_juniper_junos_software.py", line 113, in
---
- name: Install Junos OS
hosts: switch
roles:
- Juniper.junos
connection: local
gather_facts: no
vars:
OS_version: "12.3R12-S11"
OS_package: "jinstall-ex-2200-12.3R12-S11-domestic-signed.tgz"
pkg_dir: "software"
log_dir: "/Output/"
netconf_port: 830
wait_time: 3600
tasks:
- name: Checking NETCONF connectivity
wait_for:
host: "{{ inventory_hostname }}"
port: "{{ netconf_port }}"
timeout: 5
- name: Install Junos OS package
juniper_junos_software:
user: "{{ user }}"
passwd: "{{ pass }}"
version: "{{ OS_version }}"
local_package: "{{ pkg_dir }}/{{ OS_package }}"
reboot: true
validate: false
logfile: "{{ log_dir }}/{{ inventory_hostname }}-software.log"
nssu: false
register: sw
notify:
- wait_reboot
- name: Print response
debug:
var: sw
handlers:
- name: wait_reboot
wait_for:
host: "{{ inventory_hostname }}"
port: "{{ netconf_port }}"
timeout: "{{ wait_time }}"
when: not sw.check_mode
Expected results
Actual results
module output error while performing an upgrade (but it works) :
Do you mean the Junos package on the target device gets upgraded but module returns an error log ??
@rsmekala yes
Hello, do you know how to resolve this issue?
@davbeny Is the device getting rebooted ??
Hello Rsmekala, yes it's getting rebooted.
@davbeny Can you download the role from the below repository and check if that resolves your error ??
Please use the following command:
ansible-galaxy install git+https://github.com/rsmekala/ansible-junos-stdlib.git,,Juniper.junos
@rsmekala Hello, unfortunatly I don't have time to rebuild another install for the moment. But what i can tell you is that i'm using the Juniper.junos role of the 01/06/2018 2.1.0 I'm also using a custom docker image.
@davbeny Can you make the below changes in Juniper.junos role and verify ??
Note: Please exclude changes to setup.py
https://github.com/Juniper/ansible-junos-stdlib/compare/master...rsmekala:master
@vnitinv Is this the same reboot issue you faced as well ?? Wanted to check.