ansible.builtin.ucs_service_profile_template (v2.9.0) — module

Configures Service Profile Templates on Cisco UCS Manager

| "added in version" 2.8 of ansible.builtin"

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

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.0

Description

Configures Service Profile Templates on Cisco UCS Manager.

Examples can be used with the UCS Platform Emulator U(https://communities.cisco.com/ucspe).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure Service Profile Template with LAN/SAN Connectivity and all other options defaulted
  ucs_service_profile_template:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-Ctrl
    template_type: updating-template
    uuid_pool: UUID-Pool
    storage_profile: DEE-StgProf
    lan_connectivity_policy: Cntr-FC-Boot
    iqn_pool: iSCSI-Boot-A
    san_connectivity_policy: Cntr-FC-Boot
    boot_policy: DEE-vMedia
    maintenance_policy: default
    server_pool: Container-Pool
    host_firmware_package: 3.1.2b
    bios_policy: Docker
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove Service Profile Template
  ucs_service_profile_template:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-Ctrl
    state: absent

Inputs

    
name:
    description:
    - The name of the service profile template.
    - This name can be between 2 and 32 alphanumeric characters.
    - 'You cannot use spaces or any special characters other than - (hyphen), "_" (underscore),
      : (colon), and . (period).'
    - This name must be unique across all service profiles and service profile templates
      within the same organization.
    required: true

port:
    description:
    - Port number to be used during connection (by default uses 443 for https and 80 for
      http connection).
    type: int

proxy:
    description:
    - If use_proxy is no, specfies proxy to be used for connection. e.g. 'http://proxy.xy.z:8080'
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - If C(present), will verify Service Profile Templates are present and will create
      if needed.
    - If C(absent), will verify Service Profile Templates are absent and will delete if
      needed.

org_dn:
    default: org-root
    description:
    - Org dn (distinguished name)

use_ssl:
    default: true
    description:
    - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
    type: bool

hostname:
    description:
    - IP address or hostname of Cisco UCS Manager.
    - Modules can be used with the UCS Platform Emulator U(https://cs.co/ucspe)
    required: true
    type: str

iqn_pool:
    description:
    - The name of the IQN pool (initiator) you want to apply to all iSCSI vNICs for service
      profiles created from this template.

password:
    description:
    - Password for Cisco UCS Manager authentication.
    required: true
    type: str

username:
    default: admin
    description:
    - Username for Cisco UCS Manager authentication.
    type: str

use_proxy:
    default: true
    description:
    - If C(no), will not use the proxy as defined by system environment variable.
    type: bool

uuid_pool:
    default: default
    description:
    - Specifies how the UUID will be set on a server associated with a service profile
      created from this template.
    - The uuid_pool option can be the name of the UUID pool to use or '' (the empty string).
    - An empty string will use the UUID assigned to the server by the manufacturer, and
      the
    - UUID remains unassigned until a service profile created from this template is associated
      with a server. At that point,
    - the UUID is set to the UUID value assigned to the server by the manufacturer. If
      the service profile is later moved to
    - a different server, the UUID is changed to match the new server."

sol_policy:
    description:
    - The name of the Serial over LAN (SoL) policy you want to associate with service
      profiles created from this template.

user_label:
    description:
    - The User Label you want to assign to service profiles created from this template.

bios_policy:
    description:
    - The name of the BIOS policy you want to associate with service profiles created
      from this template.

boot_policy:
    default: default
    description:
    - The name of the boot order policy you want to associate with service profiles created
      from this template.

description:
    aliases:
    - descr
    description:
    - A user-defined description of the service profile template.
    - Enter up to 256 characters.
    - 'You can use any characters or spaces except the following:'
    - '` (accent mark),  (backslash), ^ (carat), " (double quote), = (equal sign), > (greater
      than), < (less than), or '' (single quote).'

power_state:
    choices:
    - up
    - down
    default: up
    description:
    - The power state to be applied when a service profile created from this template
      is associated with a server.

server_pool:
    description:
    - The name of the server pool you want to associate with this service profile template.

mgmt_ip_pool:
    default: ext-mgmt
    description:
    - The name of the management IP pool you want to use with service profiles created
      from this template.

scrub_policy:
    description:
    - The name of the scrub policy you want to associate with service profiles created
      from this template.

template_type:
    choices:
    - initial-template
    - updating-template
    default: initial-template
    description:
    - 'The template type field which can be one of the following:'
    - "initial-template \u2014 Any service profiles created from this template are not\
      \ updated if the template changes."
    - "updating-template \u2014 Any service profiles created from this template are updated\
      \ if the template changes."

vmedia_policy:
    description:
    - The name of the vMedia policy you want to associate with service profiles created
      from this template.

mgmt_vnet_name:
    description:
    - A VLAN selected from the associated VLAN group.

kvm_mgmt_policy:
    description:
    - The name of the KVM management policy you want to associate with service profiles
      created from this template.

storage_profile:
    description:
    - The name of the storage profile you want to associate with service profiles created
      from this template

threshold_policy:
    default: default
    description:
    - The name of the threshold policy you want to associate with service profiles created
      from this template.

local_disk_policy:
    description:
    - The name of the local disk policy you want to associate with service profiles created
      from this template.

power_sync_policy:
    description:
    - The name of the power sync policy you want to associate with service profiles created
      from this template.

maintenance_policy:
    description:
    - The name of the maintenance policy you want to associate with service profiles created
      from this template.

ipmi_access_profile:
    description:
    - The name of the IPMI access profile you want to associate with service profiles
      created from this template.

mgmt_interface_mode:
    choices:
    - ''
    - in-band
    description:
    - The Management Interface you want to assign to service profiles created from this
      template.

graphics_card_policy:
    description:
    - The name of the graphics card policy you want to associate with service profiles
      created from this template.

power_control_policy:
    default: default
    description:
    - The name of the power control policy you want to associate with service profiles
      created from this template.

host_firmware_package:
    description:
    - The name of the host firmware package you want to associate with service profiles
      created from this template.

mgmt_inband_pool_name:
    description:
    - How the inband management IPv4 address is derived for the server associated with
      this service profile.

lan_connectivity_policy:
    description:
    - The name of the LAN connectivity policy you want to associate with service profiles
      created from this template.

san_connectivity_policy:
    description:
    - The name of the SAN connectivity policy you want to associate with service profiles
      created from this template.

server_pool_qualification:
    description:
    - The name of the server pool policy qualification you want to use for this service
      profile template.