- 4GB of RAM
- 8GB of Disk space
I did mine using VMM on an old RedHat server I had.
SSH into machine (I used: [email protected]
)
yum -y install ansible git
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
Get UCS Ansible Files
pip install ucsmsdk
git clone https://github.com/ciscoucs/ucsm_apis
cd ucsm_apis
sudo make install
cd ~/
git clone https://github.com/dsoper2/ucsm-ansible
cd ucsm-ansible
python install.py
cd ~/ucsm-ansible
touch inventory/pdx # alternatively name it something about your site.
In this file make it similar to the following:
[pdx]
ucs1 ucs_ip=172.28.225.159 ucs_username=admin ucs_password=Cisco123
ucs2 ucs_ip=172.28.225.163 ucs_username=admin ucs_password=Cisco123
You can add additional systems. In this case the group is pdx
and the server names are ucs1
and ucs2
. In this way
ansible can communicate with multiple UCS domains at the same time.
We created a playbook called VLANs that looks like the following:
---
- hosts: localhost
connection: local
gather_facts: no
roles:
- common
- hosts: pdx
connection: local
gather_facts: no
tasks:
- name: ensure VLANs 104-106 are in place.
ucs_vlans:
hostname: "{{ucs_ip}}"
username: "{{ucs_username}}"
password: "{{ucs_password}}"
vlan_list:
- name: vlan104
id: "104"
- name: vlan105
id: "105"
- name: vlan106
id: "106"
Then we deploy it with:
ansible-playbook vlan.yml