After completing this section, you should be able to make basic configuration settings such as the DNS name servers or domain name on Cisco IOS and VyOS network devices.
By default, configuration statements apply to the top level or global command context.
The parents keyword applies a command or set of command lines in the context of a parent command.
The following task sets commands at the global level:
- name: configure top level commandsios_config:lines:- hostname {{ inventory_hostname }} - domain-name {{ domain_name }} - ip name-server {{ nameserver1 }} - username {{ ansible_user }} privilege 15 secret {{ ansible_ssh_pass }}
The following task applies commands within the context of a given interface:
- name: configure an interfaceios_config:lines:- switchport access vlan {{ interface.vlan }} - description: {{ interface.description }} - no shutdownparents:interface {{ interface.name }}
Click CREATE to build all of the virtual machines needed for the classroom lab environment. This may take several minutes to complete. Once created the environment can then be stopped and restarted to pause your experience.
If you DELETE your lab, you will remove all of the virtual machines in your classroom and lose all of your progress.