intersight_server_profile
Server Profile configuration for Cisco Intersight
Collection: cisco.intersight
Full Name: cisco.intersight.intersight_server_profile
Synopsis
Server Profile configuration for Cisco Intersight
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_private_key | string | Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt_string –vault-id tme@/Users/dsoper/Documents/vault_password_file ‘—–BEGIN EC PRIVATE KEY—– | ||
| api_uri | string | https://intersight.com/api/v1 | URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. | |
| api_key_id | string | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. Required if I(api_bearer_token) is not provided. | ||
| api_bearer_token | string | Bearer token for OAuth2 authentication with the Intersight API. When provided, I(api_key_id) and I(api_private_key) are not required and the C(cryptography) Python library is not needed. If not set, the value of the INTERSIGHT_API_BEARER_TOKEN environment variable is used. Secret value; omitted from logs and results. | ||
| validate_certs | bool | true | Boolean control for verifying the api_uri TLS certificate | |
| use_proxy | bool | true | If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. | |
| state | string | present | If C(present), will verify the resource is present and will create if needed. If C(absent), will verify the resource is absent and will delete if needed. Choices: present, absent | |
| organization | string | default | The name of the Organization this resource is assigned to. Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization. | |
| name | string | yes | The name assigned to the Server Profile. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_. | |
| target_platform | string | Standalone | The platform for which the server profile is applicable. Can either be a server that is operating in Standalone mode or which is attached to a Fabric Interconnect (FIAttached) managed by Intersight. Choices: Standalone, FIAttached | |
| tags | list | [] | List of tags in Key: | |
| description | string | The user-defined description of the Server Profile. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). | ||
| assigned_server | string | Managed Object ID (MOID) of assigned server. Option can be omitted if user wishes to assign server later. Mutually exclusive with C(assigned_server_serial). | ||
| assigned_server_serial | string | Serial number of the server to assign. The module will resolve the serial number to a MOID via the Intersight API. Option can be omitted if user wishes to assign server later. Mutually exclusive with C(assigned_server). | ||
| adapter_policy | string | Name of Adapter Policy to associate with this profile. | ||
| bios_policy | string | Name of BIOS Policy to associate with this profile. | ||
| boot_order_policy | string | Name of Boot Order Policy to associate with this profile. | ||
| certificate_policy | string | Name of Certificate Policy to associate with this profile. | ||
| drive_security_policy | string | Name of Drive Security Policy to associate with this profile. | ||
| firmware_policy | string | Name of Firmware Policy to associate with this profile. | ||
| imc_access_policy | string | Name of IMC Access Policy to associate with this profile. | ||
| ipmi_over_lan_policy | string | Name of IPMI over LAN Policy to associate with this profile. | ||
| lan_connectivity_policy | string | Name of LAN Connectivity Policy to associate with this profile. | ||
| ldap_policy | string | Name of LDAP Policy to associate with this profile. | ||
| local_user_policy | string | Name of Local User Policy to associate with this profile. | ||
| network_connectivity_policy | string | Name of Network Connectivity Policy to associate with this profile. | ||
| ntp_policy | string | Name of NTP Policy to associate with this profile. | ||
| power_policy | string | Name of Power Policy to associated with this profile. | ||
| san_connectivity_policy | string | Name of SAN Connectivity Policy to associate with this profile. | ||
| sd_card_policy | string | Name of SD Card Policy to associate with this profile. | ||
| serial_over_lan_policy | string | Name of Serial over LAN Policy to associate with this profile. | ||
| smtp_policy | string | Name of SMTP Policy to associate with this profile. | ||
| snmp_policy | string | Name of SNMP Policy to associate with this profile. | ||
| ssh_policy | string | Name of SSH Policy to associate with this profile. | ||
| storage_policy | string | Name of Storage Policy to associate with this profile. | ||
| syslog_policy | string | Name of Syslog Policy to associate with this profile. | ||
| thermal_policy | string | Name of Thermal Policy to associate with this profile. | ||
| virtual_kvm_policy | string | Name of Virtual KVM Policy to associate with this profile. | ||
| virtual_media_policy | string | Name of Virtual Media Policy to associate with this profile. | ||
| uuid_address_type | string | UUID address allocation type for the server. C(pool) to assign UUID from a UUID pool. C(static) to assign a static UUID address. Choices: pool, static | ||
| uuid_pool | string | Name of the UUID pool to assign UUID from. Required when C(uuid_address_type) is C(pool). | ||
| static_uuid_address | string | Static UUID address to assign to the server. Must include UUID prefix xxxxxxxx-xxxx-xxxx along with the UUID suffix of format xxxx-xxxxxxxxxxxx. Example format 550e8400-e29b-41d4-a716-446655440000. Required when C(uuid_address_type) is C(static). | ||
| action | string | The action to perform on the server profile after it has been configured. C(Deploy) will deploy the profile to the assigned server. The profile must have a server assigned. C(Undeploy) will undeploy the profile from the assigned server. C(Unassign) will unassign the server from the profile by clearing the AssignedServer and setting ServerAssignmentMode to None. C(Attach) will attach the profile to a server profile template using the Intersight MoMerger API. Requires C(server_profile_template) to specify the template name. C(Detach) will detach the profile from its associated server profile template. If not specified, no action is taken beyond configuring the profile. All actions are idempotent and will not repeat if the profile is already in the desired state. Choices: Deploy, Undeploy, Unassign, Attach, Detach | ||
| server_profile_template | string | Name of the Server Profile Template to attach to when C(action) is C(Attach). The template must exist in the same organization as the server profile. | ||
| wait_for_action | bool | true | Whether to wait for the deploy or undeploy action to complete before returning. When C(true), the module will poll the profile status until the action completes or times out. When C(false), the module will submit the action and return immediately. | |
| action_timeout | int | 1200 | Maximum time in seconds to wait for a deploy or undeploy action to complete. Only used when C(wait_for_action) is C(true). | |
| action_poll_interval | int | 60 | Time in seconds between status polls when waiting for an action to complete. Only used when C(wait_for_action) is C(true). |
Example
yaml
- cisco.intersight.intersight_server_profile:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assigned_server: 5e3b517d6176752d319a9999
boot_order_policy: COS-Boot
description: Profile for Server1
imc_access_policy: sjc02-d23-access
lan_connectivity_policy: sjc02-d23-lan
local_user_policy: guest-admin
name: SP-Server1
ntp_policy: lab-ntp
storage_policy: storage
tags:
- Key: Site
Value: SJC02
target_platform: FIAttached
virtual_media_policy: COS-VM
name: Configure Server Profile
- cisco.intersight.intersight_server_profile:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assigned_server: 5e3b517d6176752d319a9998
boot_order_policy: COS-Boot
description: Profile with UUID from pool
name: SP-Server2
target_platform: FIAttached
uuid_address_type: pool
uuid_pool: UUID-Pool-01
name: Configure Server Profile with UUID from Pool
- cisco.intersight.intersight_server_profile:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assigned_server: 5e3b517d6176752d319a9997
description: Profile with static UUID
name: SP-Server3
static_uuid_address: 550e8400-e29b-41d4-a716-446655440000
target_platform: Standalone
uuid_address_type: static
name: Configure Server Profile with Static UUID
- cisco.intersight.intersight_server_profile:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assigned_server_serial: FCH2149V0GN
boot_order_policy: COS-Boot
description: Profile assigned by serial number
name: SP-Server4
target_platform: FIAttached
name: Configure Server Profile with server serial number
- cisco.intersight.intersight_server_profile:
action: Deploy
action_timeout: 1800
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
assigned_server: 5e3b517d6176752d319a9999
boot_order_policy: COS-Boot
description: Profile with auto-deploy
name: SP-Server5
target_platform: FIAttached
name: Configure and Deploy Server Profile
- cisco.intersight.intersight_server_profile:
action: Deploy
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
wait_for_action: false
name: Deploy existing Server Profile (fire and forget)
- cisco.intersight.intersight_server_profile:
action: Undeploy
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
name: Undeploy Server Profile
- cisco.intersight.intersight_server_profile:
action: Unassign
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
name: Unassign server from profile
- cisco.intersight.intersight_server_profile:
action: Attach
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
server_profile_template: My-Standard-Template
name: Attach profile to a template
- cisco.intersight.intersight_server_profile:
action: Detach
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
name: Detach profile from its template
- cisco.intersight.intersight_server_profile:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: SP-Server1
state: absent
name: Delete Server Profile