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

ios_config: backups contain non-config lines #57522

Open
hexdump0x0200 opened this issue Jun 7, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@hexdump0x0200
Copy link
Contributor

commented Jun 7, 2019

SUMMARY

backups contain non-config lines

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ios_config

ANSIBLE VERSION
ansible 2.9.0.dev0
  config file = /home/administrator/ansible_dev/network_backup_restore/ansible.cfg
  configured module search path = [u'/home/administrator/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/administrator/ansible_dev/ansible/lib/ansible
  executable location = /home/administrator/ansible_dev/ansible/bin/ansible
  python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
CONFIGURATION
DEFAULT_TRANSPORT(/home/administrator/PycharmProjects/ansible_dev/network_backup_restore/ansible.cfg) = paramiko
PARAMIKO_HOST_KEY_AUTO_ADD(/home/administrator/PycharmProjects/ansible_dev/network_backup_restore/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/home/administrator/PycharmProjects/ansible_dev/network_backup_restore/ansible.cfg) = True
OS / ENVIRONMENT

any version IOS

STEPS TO REPRODUCE
---
- hosts: all
  gather_facts: no
  tasks:
  - name: backup config
    ios_config:
     backup: yes
     backup_options:
      dir_path: backups
      filename: "{{inventory_hostname}}"
EXPECTED RESULTS

Files 'backups/*' will contain configuration backups that can be used to restore.

ACTUAL RESULTS
head backups/*
==> backups/sw6 <==
Building configuration...

Current configuration : 2966 bytes
!
! No configuration change since last restart
! NVRAM config last updated at 15:41:13 Thu Jun 6 2019 by root
!
version 12.2
no service pad
service timestamps debug datetime localtime show-timezone

==> backups/test-sw1-1 <==
Building configuration...

Current configuration : 7582 bytes
!
! Last configuration change at 10:07:24 Wed Jun 5 2019 by root
! NVRAM config last updated at 14:17:09 Tue Jun 4 2019 by root
!
version 12.1
no service pad
service timestamps debug datetime localtime show-timezone

Аiles contain at the beginning lines, which is not a configuration:

Building configuration...

Current configuration : 7582 bytes

These lines cause errors when trying to load them into the device.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

@hexdump0x0200, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@justjais

This comment has been minimized.

Copy link
Contributor

commented Jun 21, 2019

@hexdump0x0200 Thanks for raising the issue, but we have come across this issue before, plz refer the issue #50029.

@ansibot ansibot removed the needs_triage label Jun 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.