Do what the playbook does

NetLab lab Intermediate 4 tasks 20 points

An Ansible playbook is meant to push this to SW1: VLAN 10 named SALES, and fa0/2 as an access port in VLAN 10. The automation server is down, so do it by hand (exactly what the playbook would do), then answer the questions about how automation would have handled it.

- name: Configure access VLAN
  hosts: switches
  tasks:
    - name: Create VLAN 10
      cisco.ios.ios_vlans:
        config:
          - name: SALES
            vlan_id: 10
        state: merged

How it works: this is VulnTech NetLab, a network simulator running in your browser. Click a device in the diagram to open its console and type commands, just like on real equipment (? shows help, Tab finishes a word). Click a cable to inspect it. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Your work is kept if you reload; Reset starts the network over.

Solution explanation

You typed by hand exactly the state the playbook describes. Because the playbook is idempotent, running it again would report 0 changes: the VLAN and the port are already right. That's the whole point of configuration management - the file is the source of truth, and the tool only makes the device match it.

Show solution
[SW1]
enable
configure terminal
vlan 10
name SALES
exit
interface fa0/2
switchport mode access
switchport access vlan 10
end
show vlan brief
HOME LABS COMMUNITY DASHBOARD