cisco.intersight.intersight_server_profile_derive module – Derive Server Profiles from Templates in Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.20.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cisco.intersight.
To use it in a playbook, specify: cisco.intersight.intersight_server_profile_derive.
Synopsis
Derive new Server Profiles from a Server Profile Template using the Intersight MoCloner API.
Sync existing derived profiles back to their template when the template has changed using the MoMerger API.
Idempotent - will not re-derive if the profile already exists, and will not sync if the profile is already in sync.
For more information see Cisco Intersight.
Parameters
Parameter |
Comments |
|---|---|
Bearer token for OAuth2 authentication with the Intersight API. When provided, api_key_id and api_private_key are not required and the If not set, the value of the INTERSIGHT_API_BEARER_TOKEN environment variable is used. |
|
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 api_bearer_token is not provided. |
|
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----- <your private key data> -----END EC PRIVATE KEY-----’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. Required if api_bearer_token is not provided. |
|
URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
|
When When Choices:
|
|
The name of the Organization this resource is assigned to. Default: |
|
List of Server Profile names to derive from the template. Each name must be unique within the organization. |
|
If If Choices:
|
|
Name of the Server Profile Template to derive from. The template must exist in the specified organization. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Derive a single server profile from a template
cisco.intersight.intersight_server_profile_derive:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: default
template_name: My-Standard-Template
profile_names:
- SP-Derived-1
- name: Derive multiple server profiles from a template
cisco.intersight.intersight_server_profile_derive:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: default
template_name: My-Standard-Template
profile_names:
- SP-Derived-1
- SP-Derived-2
- SP-Derived-3
- name: Force sync derived profiles back to template
cisco.intersight.intersight_server_profile_derive:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
template_name: My-Standard-Template
profile_names:
- SP-Derived-1
force_sync: true
- name: Delete derived server profiles
cisco.intersight.intersight_server_profile_derive:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
template_name: My-Standard-Template
profile_names:
- SP-Derived-1
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Summary of derive/sync operations performed. Returned: always Sample: |