Automate UCS Manager configuration with Ansible
Ansible playbooks for configuring Cisco UCS Manager.
Getting Started
The Cisco Unified Computing System (UCS) is an architecture data center server platform composed of computing hardware, virtualization support, switching fabric, and management software.
Management of the system devices is handled by the Cisco UCS Manager software embedded into the Fabric Interconnect, which is accessed by the administrator through a common browser, a command line interface like Windows PowerShell or programmatically through an API.
Don´t panic if there is no UCS Manager around. Some of the examples below are executed upon Cisco Devnet sandboxes: https://developer.cisco.com/site/sandbox/
Once your lab is reserved, the VPN credentials are sent by email as shown below:
Before connecting from your local laptop to the Devnet sandbox, you have to set up the VPN connection with the details provided above.
In order to interwork with UCS Manager, there is a Python dependency required. The “ucsmsdk” must be installed:
For testing purposes, I have created the inventory file below including the UCS Manager credentials.
The following playbook configures an address pool in UCS.
Running the playbook:
ansible-playbook create-pool-yaml -i inventory -vvv
You can establish an SSH connection towards UCS Manager and check that the pool is created:
Similarly, the following playbook creates a VLAN.
Running the playbook:
Validating that the VLAN is created: