PARALLAX

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

NameTypeRequiredDefaultDescription
api_private_keystringFilename (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—– —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. Required if I(api_bearer_token) is not provided. Secret value; omitted from logs and results.
api_uristringhttps://intersight.com/api/v1URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used.
api_key_idstringPublic 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_tokenstringBearer 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_certsbooltrueBoolean control for verifying the api_uri TLS certificate
use_proxybooltrueIf C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
statestringpresentIf 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
organizationstringdefaultThe 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.
namestringyesThe name assigned to the Server Profile. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_.
target_platformstringStandaloneThe 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
tagslist[]List of tags in Key: Value: format.
descriptionstringThe 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_serverstringManaged 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_serialstringSerial 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_policystringName of Adapter Policy to associate with this profile.
bios_policystringName of BIOS Policy to associate with this profile.
boot_order_policystringName of Boot Order Policy to associate with this profile.
certificate_policystringName of Certificate Policy to associate with this profile.
drive_security_policystringName of Drive Security Policy to associate with this profile.
firmware_policystringName of Firmware Policy to associate with this profile.
imc_access_policystringName of IMC Access Policy to associate with this profile.
ipmi_over_lan_policystringName of IPMI over LAN Policy to associate with this profile.
lan_connectivity_policystringName of LAN Connectivity Policy to associate with this profile.
ldap_policystringName of LDAP Policy to associate with this profile.
local_user_policystringName of Local User Policy to associate with this profile.
network_connectivity_policystringName of Network Connectivity Policy to associate with this profile.
ntp_policystringName of NTP Policy to associate with this profile.
power_policystringName of Power Policy to associated with this profile.
san_connectivity_policystringName of SAN Connectivity Policy to associate with this profile.
sd_card_policystringName of SD Card Policy to associate with this profile.
serial_over_lan_policystringName of Serial over LAN Policy to associate with this profile.
smtp_policystringName of SMTP Policy to associate with this profile.
snmp_policystringName of SNMP Policy to associate with this profile.
ssh_policystringName of SSH Policy to associate with this profile.
storage_policystringName of Storage Policy to associate with this profile.
syslog_policystringName of Syslog Policy to associate with this profile.
thermal_policystringName of Thermal Policy to associate with this profile.
virtual_kvm_policystringName of Virtual KVM Policy to associate with this profile.
virtual_media_policystringName of Virtual Media Policy to associate with this profile.
uuid_address_typestringUUID 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_poolstringName of the UUID pool to assign UUID from. Required when C(uuid_address_type) is C(pool).
static_uuid_addressstringStatic 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).
actionstringThe 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_templatestringName 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_actionbooltrueWhether 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_timeoutint1200Maximum 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_intervalint60Time 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
Search
    ↑ ↓ move↵ openesc close