--- # Configure Cumulus switches after boot # Run this after the VMs have fully booted (give them ~2-3 minutes) - name: Configure Cumulus Switches hosts: localhost gather_facts: no vars: all_switches: "{{ topology.spines + topology.leaves }}" ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' tasks: - name: Wait for switches to be reachable wait_for: host: 127.0.0.1 port: "{{ mgmt_ssh_base_port + idx }}" delay: 10 timeout: 300 loop: "{{ all_switches }}" loop_control: index_var: idx label: "{{ item.name }}" - name: Configure each switch include_tasks: tasks/configure-switch.yml vars: switch_name: "{{ item.0.name }}" switch_ssh_port: "{{ mgmt_ssh_base_port + item.1 }}" switch_type: "{{ 'spine' if item.0.name.startswith('spine') else 'leaf' }}" switch_id: "{{ item.1 }}" loop: "{{ all_switches | zip(range(all_switches | length)) | list }}" loop_control: label: "{{ item.0.name }}"