ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
transfer-on-commit of config archive file to remote SCP site fails when committed from Ansible playbook.
Issue Type
- Bug Report
Module Name
config
juniper.device collection and Python libraries version
(venv) root@ubuntu:~/ansible_issue_check1# pip list
Package Version
--------------------- -----------------
ansible 10.4.0
ansible-core 2.17.4
ansible-junos-stdlib 1.0.6
bcrypt 4.2.0
cffi 1.17.1
colorama 0.4.6
configparser 7.1.0
cryptography 43.0.1
future 1.0.0
icdiff 1.9.1
Jinja2 3.1.4
jsnapy 1.3.8
junos-eznc 2.7.1+9.ga64698b2
jxmlease 1.0.3
lxml 5.3.0
MarkupSafe 2.1.5
ncclient 0.6.15
packaging 24.1
paramiko 3.4.0
pip 22.0.2
pycparser 2.22
PyNaCl 1.5.0
pyparsing 3.2.0b1
pyserial 3.5
PyYAML 6.0.2
resolvelib 1.0.1
scp 0.15.0
setuptools 59.6.0
six 1.16.0
transitions 0.9.2
xmltodict 0.13.0
yamlordereddictloader 0.4.2
OS / Environment
QFX5130-32CD Model: qfx5130-32cd Junos: 22.2R3-S4.5-EVO Yocto: 3.0.2 Linux Kernel: 5.2.60-yocto-standard-gc37311f JUNOS-EVO OS 64-bit [junos-evo-install-qfx-ms-x86-64-22.2R3-S4.5-EVO]
Summary
transfer-on-commit of config archive file to remote SCP site fails when committed from Ansible playbook.
Steps to reproduce
on Device:
show system archival configuration { transfer-on-commit; routing-instance mgmt_junos; archive-sites { "scp://[email protected]/var/tmp" password "xyz"; ## SECRET-DATA "scp://[email protected]/var/tmp" password "xyz"; ## SECRET-DATA } }
yaml
---
- name: Execute Juniper configuration commands.
hosts: all
#roles:
# - Juniper.junos
collections:
- juniper.device
connection: local
gather_facts: false
vars_prompt:
- name: DEVICE_PASSWORD
prompt: Device password
private: true
tasks:
- name: Run Juniper configuration commands.
config:
passwd: "{{ DEVICE_PASSWORD }}"
timeout: 120
load: set
format: set
config_mode: exclusive
comment: "Performed by Ansible Playbook simple-config.yml"
commit: true
lines:
- set snmp description "Pok B/706 GPFS Testbed for Cross Building Communications"
ignore_warning:
- "statement not found"
register: set_conf_response
- name: Print config diff
# diff and diff_lines are subfields on the Ansible response.
# The differences will only print if a change was made and
# diff is defined.
debug:
var: set_conf_response.diff_lines
when: "set_conf_response.diff is defined"
Expected results
config archive file is uploaded to remote SCP site after config commit.
Actual results
config archive file is not uploaded to remote SCP site after config commit.