cisco.intersight.intersight_drive_security_policy module – Drive Security Policy configuration for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.8.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_drive_security_policy.
Synopsis
Manages Drive Security Policy configuration on Cisco Intersight.
A policy to configure drive security settings for Cisco Intersight managed servers.
Supports both Manual key management and Remote key management (KMIP).
For more information see Cisco Intersight.
Parameters
Parameter |
Comments |
|---|---|
Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. |
|
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. |
|
URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
|
The user-defined description for the Drive Security Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Configuration for manual key management. Use this for local key management with manual passphrase. Either |
|
Current Security Key Passphrase which is already configured on the server. Required only if drive security is already enabled with manual key. The passphrase must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one number, and one special character. |
|
New Security Key Passphrase to be configured on the server. The passphrase must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one number, and one special character. |
|
The name assigned to the Drive Security Policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
The name of the Organization this resource is assigned to. Profiles, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization. Default: |
|
Configuration for remote key management using KMIP server. Use this for remote key management with KMIP protocol. Either |
|
Current Security Key Passphrase which is already configured on the server. Required only if drive security is already enabled with manual key and switching to KMIP. The passphrase must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one number, and one special character. |
|
The password for the KMIP server login. Optional parameter for KMIP authentication. |
|
Primary KMIP server configuration. At least one of |
|
Enables/disables the primary KMIP server. Choices:
|
|
The IP address or hostname of the KMIP server. Can be an IPv4 address, IPv6 address, or hostname. Hostnames are valid only when Inband is configured for the CIMC address. Required when |
|
The port to which the KMIP client should connect. Valid range is 1024-65535. Default: |
|
The timeout before which the KMIP client should connect. Valid range is 1-250 seconds. Default: |
|
Secondary KMIP server configuration. At least one of |
|
Enables/disables the secondary KMIP server. Choices:
|
|
The IP address or hostname of the KMIP server. Can be an IPv4 address, IPv6 address, or hostname. Hostnames are valid only when Inband is configured for the CIMC address. Required when |
|
The port to which the KMIP client should connect. Valid range is 1024-65535. Default: |
|
The timeout before which the KMIP client should connect. Valid range is 1-250 seconds. Default: |
|
Server Public Root CA Certificate in base64 encoded format. Required when using remote key management (KMIP). |
|
Enables/disables authentication for communicating with KMIP server. When enabled, authentication is mandatory. Choices:
|
|
The username for the KMIP server login. Required when |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. Default: |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create Drive Security Policy with Manual Key
cisco.intersight.intersight_drive_security_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "manual-drive-security-policy"
description: "Drive security policy with manual key management"
manual_key:
new_key: "MyS3cur3P@ssw0rd"
tags:
- Key: "Environment"
Value: "Production"
state: present
- name: Create Drive Security Policy with Manual Key (updating existing)
cisco.intersight.intersight_drive_security_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "manual-drive-security-policy"
description: "Drive security policy with manual key management"
manual_key:
new_key: "MyN3wS3cur3P@ssw0rd"
existing_key: "MyS3cur3P@ssw0rd"
state: present
- name: Create Drive Security Policy with KMIP (Primary Server Only)
cisco.intersight.intersight_drive_security_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "kmip-drive-security-policy"
description: "Drive security policy with KMIP"
remote_key:
primary_server:
enable_drive_security: true
ip_address: "192.168.1.100"
port: 5696
timeout: 60
secondary_server:
enable_drive_security: false
server_certificate: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t..."
use_authentication: false
state: present
- name: Create Drive Security Policy with KMIP (Both Servers with Authentication)
cisco.intersight.intersight_drive_security_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "kmip-auth-drive-security-policy"
description: "Drive security policy with KMIP and authentication"
remote_key:
primary_server:
enable_drive_security: true
ip_address: "192.168.1.100"
port: 5696
timeout: 60
secondary_server:
enable_drive_security: true
ip_address: "192.168.1.101"
port: 5696
timeout: 60
server_certificate: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t..."
use_authentication: true
username: "kmip_user"
password: "kmip_password"
state: present
- name: Delete Drive Security Policy
cisco.intersight.intersight_drive_security_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "manual-drive-security-policy"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The API response output returned by the specified resource. Returned: always Sample: |