Its hard to tell without knowing the resources of the ansible controller, number of changes/hosts and forks but, networking tasks are more CPU related due to running on localhost and sending api calls.
Jonathan Lozada De La Matta on mobile ________________________________ From: ansible-project@googlegroups.com on behalf of Sharon Day <sdayn...@gmail.com> Sent: Sunday, June 16, 2019 8:38 AM To: Ansible Project Subject: [ansible-project] High CPU when running playbook to disable virtual servers I recently run an Ansible playbook to disable several virtual servers on the LTM F5. I noticed that when I was running the playbook CPU on the F5 was up to about 97% while the playbook was running and it made the GUI interface almost unusable. Any suggestions on how to make this run more efficiently? Also, if I have a list of 25 VIPs is the Ansible host logging into the F5 25 times to make the change or is it logging in once and then running through all the virtual servers. --- - name: Disable VIPs hosts: - xx.xx.xx.xx connection: local gather_facts: False vars_files: - /automation/ansible/playbooks/f5/virtuals.yml tasks: - name: Obtain Creds include_vars: /etc/ansible/group_vars/password.yml no_log: true - name: Disable VIP bigip_command: commands: - tmsh modify ltm virtual "{{ item.vip_name }}" disabled provider: "{{ cli }}" delegate_to: localhost with_items: - "{{ virtual1 }}" notify: Show VIP handlers: - name: Show VIP bigip_command: commands: - tmsh show ltm virtual | grep -E -A 4 "Server" provider: "{{ cli }}" delegate_to: localhost register: result - debug: msg="{{ result.stdout_lines }}" - name: Sync configuration from device to group bigip_configsync_action: device_group: "{{ device_group }}" sync_device_to_group: "{{ save_config }}" provider: "{{ cli }}" -- 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 ansible-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>. To post to this group, send email to ansible-project@googlegroups.com<mailto:ansible-project@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dc717a6f-54ff-4567-8bbd-ed154a6cf092%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/dc717a6f-54ff-4567-8bbd-ed154a6cf092%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/SN6PR08MB3984C6497A108942112FA708A6E80%40SN6PR08MB3984.namprd08.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.