Forum Discussion

romio28's avatar
romio28
Icon for Altostratus rankAltostratus
Apr 08, 2024

Ansible very slow

I’m trying to make e playbook to create pools and virtual servers but it take a while, below an example, any solution?

 

---
- name: Create local traffic objects on a BIG-IP
  hosts: F5
  gather_facts: False
  connection: local
  vars:
    provider:
      password: "{{ ansible_password }}"
      server: "{{ ansible_host }}"
      user: "{{ ansible_user }}"
      validate_certs: False
    

    pools:
        - ["POOL_1", "INTERNET", "MEM_1"]
        - ["POOL_2", "INTERNET", "MEM_2"]
        - ["POOL_3", "WAN", "MEM_3"]

 


  tasks:


    - name: Create pools
      bigip_pool:
        state: present
        name: "{{ item[0] }}"
        partition: "{{ item[1] }}"
        provider: "{{ provider }}"
      #delegate_to: localhost
      loop:
        "{{ pools }}"

    - name: Add pool members
      bigip_pool_member:
        name: "{{ item[0] }}"
        partition: "{{ item[1] }}"
        host: "{{ item[2] }}"
        port: "80"
        provider: "{{ provider }}"
        reuse_nodes: false
      delegate_to: localhost
      loop:
        "{{ pools }}"

 

 

 

No RepliesBe the first to reply