CiscoUcs.ucs

Ansible Role: ucs

This is an Ansible role used to set up configurations on Cisco UCS Manager. You can configure LAN, SAN, storage, servers, and more using this role.

Requirements

  • You need UCS modules from Ansible version 2.5 or higher.
  • UCS Ansible modules also require the ucsmsdk Python module.

Installation

You can test this role in two ways:

  1. Cloning from GitHub: Clone the repository to your ANSIBLE_ROLES_PATH. Run this command:

    git clone https://github.com/ciscoucs/ansible-role-ucs CiscoUcs.ucs
    
  2. Using Ansible Galaxy: Install it by running:

    ansible-galaxy install CiscoUcs.ucs
    

Role Variables

The default variables can be found in defaults/main.yml for each role. They are based on the following Cisco Validated Designs (CVDs):

  1. For SAN based environments: FlexPod Datacenter with Docker CVD. More details here.

  2. For Local server storage environments: Cisco UCS with Contiv and Docker Enterprise Edition. More details here.

  3. For Storage server environments: S3260 Storage Server with SwiftStack CVD. More details here.

Default variables have the lowest priority in Ansible's variable searching. You should adjust these defaults by using your custom variables in playbooks or other variable locations. Check the tests directory for more details and examples.

Example Playbook

tests/test.yml provides an example of using the role:

---
- hosts: ucs
  connection: local
  gather_facts: no
  tasks:
  - include_role:
      name: CiscoUcs.ucs

To run part of the configuration, you can include a specific subdirectory role and adjust variables. Here’s an example using only the vlans role with custom variables:

---
- hosts: ucs
  connection: local
  gather_facts: no
  tasks:
  - include_role:
      name: CiscoUcs.ucs/lan/vlans
    vars:
      ucs_vlans:
      - name: Native-VLAN
        id: '2'
        native: 'yes'

To run this playbook, use the command:

ansible-playbook [-i <inventory file>] test.yml

License

This project is licensed under the Apache 2.0 License.

Author Information

David Soper (@dsoper2), CiscoUcs (@CiscoUcs)

Informazioni sul progetto

Cisco UCS Developer

Installa
ansible-galaxy install CiscoUcs.ucs
Licenza
apache-2.0
Download
453
Proprietario