Hello

I do use Ansible 2.4 to manage 300 cisco switches.

4 ansible connections are stuck at every run.

USER %CPU %MEM STAT START   TIME COMMAND
me   99.5  0.1 R    12:01 223:06 /usr/bin/python /usr/bin/ansible-connection
me   99.4  0.1 R    12:01 222:47 /usr/bin/python /usr/bin/ansible-connection
me   99.6  0.1 R    12:07 217:17 /usr/bin/python /usr/bin/ansible-connection
me   99.5  0.1 R    12:07 217:09 /usr/bin/python /usr/bin/ansible-connection



The ansible log tells me which hosts are causing the problem but none is 
said about the reason that keeps the ansible-connection up and why it takes 
100% CPU.

Any idea ?

The playbooks are just a sequence of ios_command tasks followed by a 
serialization of the results.

---
- hosts: cisco-ios-l2
  gather_facts: no
  connection: local


  vars:
    ios_provider:
      username: "{{ un }}"
      password: "{{ pwd }}"
      host: "{{ inventory_hostname }}"


  tasks:


    - name: RUN analyse on IOS
      ios_command:
        provider: "{{ ios_provider }}"
        commands:
          - show interface status
          - show vlan
          - show mac address-table
          - show ip interface brief
          - show ip arp
        timeout: 30
      register: zeResults


    - name: save interface status
      copy:
        content: "{{ zeResults.stdout[0] }}"
        dest: vital/interfaces/{{ inventory_hostname }}.interfaces


    - name: save vlans
      copy:
        content: "{{ zeResults.stdout[1] }}"
        dest: vital/vlan/{{ inventory_hostname }}.vlan


    - name: save mac address-table
      copy:
        content: "{{ zeResults.stdout[2] }}"
        dest: vital/fdb/{{ inventory_hostname }}.fdb


    - name: save ip interface brief
      copy:
        content: "{{ zeResults.stdout[3] }}"
        dest: vital/ip/{{ inventory_hostname }}.ip


    - name: save arp
      copy:
        content: "{{ zeResults.stdout[4] }}"
        dest: vital/arp/{{ inventory_hostname }}.arp

What should I do to avoid that situation ?

Thanks to the wonderfull Ansible community

William

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d6afa90a-e32d-432b-b3cc-aaf9a58f13fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to