Cisco IMC Ansible Module Overview
Cisco has published an Ansible module for managing standalone servers through the Cisco Integrated Management Controller (IMC). Ansible provides a rich framework for configuration management of software and hardware infrastructure. For example, when configuring a storage virtual drive with Ansible, the user can simply specify the desired settings for the virtual drive and Ansible will take care of the programming steps:
- name: create virtual drive
cisco_imc_virtual_drive:
raid_level: 0
drive_group: [[3]]
controller_slot: "SLOT-HBA"
size: "200GB"
boot_drive: False
ip: "{{ imc_ip }}"
username: "{{ imc_username }}"
password: "{{ imc_password }}"
state: "present"
print_exception: True
(Additional examples are provided on GitHub and in the video demo also linked below).
Example Features Supported in the Cisco IMC Ansible Module
- Common IMC admin tasks such as user account creation and NTP configuration.
- Storage configuration including virtual drive creation with RAID levels, sizing, and boot drive settings all controlled through the IMC management interface.
- Precise boot order control.
The Cisco IMC Ansible module is built on the Cisco IMC Python SDK, so the wide range of configuration options supported from the Python SDK are possible through Ansible.
For More Information Including Installation and Usage Instructions
Note on connecting to system running IMC version 3.0 and later:
If you encounter a ‘connection reset by peer’ error when connecting to a IMC 3.0 system, the typical cause is python's ssl version not supporting TLS 1.2 which is required by IMC 3.0.
For successfully connecting to IMC 3.0, the following requirements have to be fulfilled :
- Python2 version >= 2.7.9 or Python3 version >= 3.2
- Openssl version >= 1.0.1
To directly check the OpenSSL version, here is an example command:
- python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Here is example output from OSX and CentOS 7 systems supporting connections to IMC 3.0:
$ python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.0.2j 26 Sep 2016
If OpenSSL is older than 1.0.1 (or the version isn’t reported with the python command), python or openssl will need updating to connect to IMC 3.0.