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

Module ios_config ingores parameter defaults in combination with config backup #39724

Closed
myownhost opened this issue May 4, 2018 · 9 comments
Assignees
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. cisco Cisco technologies ios Cisco IOS community module This issue/PR relates to a module. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team.

Comments

@myownhost
Copy link

myownhost commented May 4, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ios_config

C(show running-config all).

ANSIBLE VERSION
ansible 2.5.2
  config file = /etc/ansible/playbooks/switches/ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
CONFIGURATION
DEFAULT_FORKS(/etc/ansible/playbooks/switches/ansible.cfg) = 50
DEFAULT_HOST_LIST(/etc/ansible/playbooks/switches/ansible.cfg) = [u'/etc/ansible/playbooks/switches/hosts']
DEFAULT_LOG_PATH(/etc/ansible/playbooks/switches/ansible.cfg) = /var/log/ansible/network.log
HOST_KEY_CHECKING(/etc/ansible/playbooks/switches/ansible.cfg) = False
PARAMIKO_LOOK_FOR_KEYS(/etc/ansible/playbooks/switches/ansible.cfg) = False
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/playbooks/switches/ansible.cfg) = 30
OS / ENVIRONMENT

Ubuntu 16.04.4 LTS

SUMMARY

The parameter defaults: no do not work in combination with paramaeter backup: yes. The module allways do a show running-config all instead of a show running-config without all at the end. You don't need paramaters in your backup file that you are never changed in the config.

STEPS TO REPRODUCE
---
- hosts: cisco
  gather_facts: false

  tasks:
  - ios_config:
      defaults: no
      backup: yes
    register: backup_ios_location
EXPECTED RESULTS

Switch configuration without standard config included. Example config backup shows only first lines.

Building configuration...

Current configuration : 6814 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname test
...
ACTUAL RESULTS

Switch configuration with standard config included. Example config backup shows only first lines.

Building configuration...

Current configuration with default configurations exposed : 69425 bytes
!
version 12.2
parser cache
no service log backtrace
no service config
no service exec-callback
no service nagle
service slave-log
no service slave-coredump
no service pad to-xot
no service pad from-xot
no service pad cmns
no service pad
no service telnet-zeroidle
no service tcp-keepalives-in
no service tcp-keepalives-out
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
no service exec-wait
no service linenumber
no service internal
no service scripting
no service compress-config
service prompt config
no service old-slip-prompts
no service pt-vty-logging
no service disable-ip-fast-frag
no service sequence-numbers
service counters max age 0
!
hostname test
...
@myownhost myownhost reopened this May 4, 2018
@ansibot
Copy link
Contributor

ansibot commented May 4, 2018

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
Copy link
Contributor

ansibot commented May 4, 2018

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team. labels May 4, 2018
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 4, 2018
@akira6592
Copy link
Contributor

It looks like the same cause as #39475 .
and It wiil be fixed in 2.5.3.

I tried too.

in 2.5.2 result (may be show run all):

Building configuration...

Current configuration with default configurations exposed : 7176 bytes
!
version 12.2
parser cache
no service log backtrace
no service config
no service exec-callback
no service nagle
service slave-log
no service slave-coredump

in devel version result (may be show run):

Building configuration...

Current configuration : 4211 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname RT103
!
boot-start-marker
boot-end-marker

@myownhost
Copy link
Author

I tried the fix #39475 in my ansible. Works fine for me, but the problem after installing the patch is that the defaults: yes parameter also only execute the command show running-config and not show running-config all.

@akira6592
Copy link
Contributor

akira6592 commented May 4, 2018

By design, I think backup option is not affected by default option.
Even in 2.4.4, default: yes and default: no are same results (show run).

@akira6592
Copy link
Contributor

Oh, I just watched #39741. I will take notice on it.

@ganeshrn ganeshrn self-assigned this May 8, 2018
@ganeshrn
Copy link
Member

ganeshrn commented May 8, 2018

@akira6592 PR #39741 is merged in devel branch. Can you please retest on devel and check if it fixes the issue.

@akira6592
Copy link
Contributor

@ganeshrn I confirmed that it was successfully fixed in my environment. Thank you.

@ganeshrn
Copy link
Member

resolved_by_pr #39741

@dagwieers dagwieers added ios Cisco IOS community cisco Cisco technologies labels Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. cisco Cisco technologies ios Cisco IOS community module This issue/PR relates to a module. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

No branches or pull requests

6 participants