# ansible - ios\_config:  suppress all the "show running-configs" that occur after updating each port on a cisco switch?

**URL:** <https://forum.ansible.com/t/ansible-ios-config-suppress-all-the-show-running-configs-that-occur-after-updating-each-port-on-a-cisco-switch/32297>\
**Category:** Ansible Project\
**Created:** [February 21, 2020, 8:14pm UTC](https://forum.ansible.com/t/ansible-ios-config-suppress-all-the-show-running-configs-that-occur-after-updating-each-port-on-a-cisco-switch/32297 "2020-02-21T20:14:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Hawley](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@John\_Hawley](https://forum.ansible.com/u/John_Hawley)\
**Post date:** [February 21, 2020, 8:14pm UTC](https://forum.ansible.com/t/ansible-ios-config-suppress-all-the-show-running-configs-that-occur-after-updating-each-port-on-a-cisco-switch/32297/1 "2020-02-21T20:14:04Z")

</div>

I have a playbook that steps through all the ports on a cisco switch stack, adding or removing lines and it takes a very long time to run. I can see in TACACS command accounting that it is doing a “show running-config” after each port modification. If I have a switch stack with (8) 48-port switches, it can take hours for the job to complete. And it maxes out the CPU on the switch with all the “ssh” module activity.

Is there a way to suppress this action? Or is it unwise to think of doing this?

Example:

$ ansible --version  
ansible 2.9.2  
…  
python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0]

Playbook:

- hosts: switches\_live  
no\_log: false  
gather\_facts: false  
connection: local  
serial: 12  
tasks:

- name: OBTAIN LOGIN CREDENTIALS  
include\_vars: vaultfile.yml

- name: DEFINE PROVIDER  
set\_fact:  
provider:  
host: “{{ inventory\_hostname }}”  
username: “{{ username }}”  
password: “{{ password }}”

- name: CONFIGURE PORT ISE SETTINGS  
ios\_config:  
running\_config:  
defaults: no  
provider: “{{ provider }}”  
lines:

- ip access-group ACL-DEFAULT in

- authentication event fail action next-method

- authentication event server dead action authorize vlan {{ item.vlan }}

- authentication event server dead action authorize voice

- authentication event server alive action reinitialize

- authentication host-mode multi-auth

- authentication open

- authentication order dot1x mab

- authentication priority dot1x mab

- authentication port-control auto

- authentication periodic

- authentication timer reauthenticate server

- authentication violation restrict

- mab

- dot1x pae authenticator

- dot1x timeout tx-period 5

- dot1x max-reauth-req 2  
parents:

- interface {{ item.iface }}  
with\_items: “{{ port\_list }}”

- name: SAVE CONFIG  
ios\_config:  
provider: “{{ provider }}”  
save\_when: modified

$ ansible-playbook --ask-vault-pass --inventory=ise-port-configs.hosts ise-port-configs.yml  
Thu Feb 20 20:42:47 CST 2020

Vault password:

PLAY [switches\_live] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [OBTAIN LOGIN CREDENTIALS] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [esisetest4]

TASK [DEFINE PROVIDER] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [esisetest4]

TASK [CONFIGURE PORT ISE SETTINGS] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [esisetest4] =\> (item={u’iface’: u’Gi1/0/1’, u’vlan’: 54})  
changed: [esisetest4] =\> (item={u’iface’: u’Gi1/0/2’, u’vlan’: 54})  
changed: [esisetest4] =\> (item={u’iface’: u’Gi1/0/3’, u’vlan’: 54})

TASK [SAVE CONFIG] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [esisetest4]

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
esisetest4 : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Thanks for any tips.  
-John
