Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell EMC SmartFabric OS10 User Guide Release 10.5.0

Using Ansible

Ansible works by connecting to your nodes using SSH and pushing out small programs, called Ansible modules, to them. Ansible includes hundreds of network modules to support a wide variety of network device vendors. Ansible uses a simple, powerful and agentless automation framework. For more information, go to Network Automation with Ansible.

Dell EMC Networking Ansible solutions

Dell EMC Networking Ansible solutions are based on an open ecosystem that allows organizations to choose from industry-standard network applications, network operating systems, and network hardware. Use Ansible to provision and manage Dell EMC switches for rapid new device deployment and network configuration changes. Ansible also allows you to track running network device configurations against a known baseline for both Dell EMC and third-party operating systems.

The Ansible modules for Dell EMC Networking solutions allow organizations to reduce the time and effort required to design, provision, and manage networks by providing these benefits:
  • Agentless — No new software is required to install on switches.
  • Powerful — End-to-end automation of the configuration of bare metal switches using the Dell EMC Open Automation framework.
  • Easy-to-use — Dell EMC Networking modules ship with the Ansible distribution. There is nothing extra to install.
  • Best practice — Uses CLI user authentication to centralize and monitor session management.

Dell EMC Networking Ansible modules

Ansible ships with a number of modules that can be executed directly on remote hosts or through playbooks. The collection of modules is called the module library. Modules are discrete units of code that are used from the command line or in a playbook task. You can also write your own modules.

Starting with Ansible 2.2, the Ansible core supports Dell EMC Networking modules. Use these modules to manage and automate Dell EMC switches running OS6, OS9, and OS10. Dell EMC Networking modules are executed in local connection mode using CLI and SSH transport. The following OS10 modules are integrated into the Ansible core:
  • dellos10_command: Runs show commands or EXEC mode commands through Ansible. For example, show version command output displays the current OS version running on a switch.
  • dellos10_config: Runs OS10 configuration commands through Ansible.
  • dellos10_facts: Retrieves the running configuration from an OS10 switch.

Dell EMC Networking Ansible roles

Ansible roles allow you to automatically load variable files (vars_files) and tasks based on a known file structure. Grouping content by roles allows the roles to be easily shared with other users. These roles are abstracted for OS6, OS9 and OS10. Download Dell EMC Ansible Networking roles from https://galaxy.ansible.com/.

For information and examples about how to use the Ansible roles, see Dell EMC Networking Repositories.

Ansible inventory file

The inventory file contains the list of hosts on which you want to run commands. Ansible can run tasks on multiple hosts at the same time.

Ansible playbooks use /etc/ansible/hosts as the default inventory file. To specify a different inventory file, use the -i filepath command as an option when you run an Ansible playbook.

Ansible playbook file

Using playbooks, Ansible can configure multiple devices. Playbooks are human-readable scripts that are expressed in YAML format. An Ansible playbook takes inventory and playbook files as arguments and maps the group of hosts in the inventory files to the tasks listed in the playbook file.

Ansible variables

In Ansible, variables define switch configurations. Many Dell EMC switches have common configurations. Common configuration variables are stored in the vars/main.yaml file; for example, dns_server and ntp_server. All host-specific configurations are stored in the host_vars/host_name.yaml configuration file; for example, the hostname of a switch. Variables are also used as part of playbook definitions, command-line arguments, and inventory definitions.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\