dellemc.openmanage.idrac_virtual_media (9.1.0) — module

Configure the Remote File Share settings.

| "added in version" 6.3.0 of dellemc.openmanage"

Authors: Felix Stephen (@felixs88)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

This module allows to configure Remote File Share settings.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Insert image file to Remote File Share 1 using CIFS share.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    virtual_media:
      - insert: true
        image: "//192.168.0.2/file_path/file.iso"
        username: "username"
        password: "password"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Insert image file to Remote File Share 2 using NFS share.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    virtual_media:
      - index: 2
        insert: true
        image: "192.168.0.4:/file_path/file.iso"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Insert image file to Remote File Share 1 and 2 using HTTP.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    force: true
    virtual_media:
      - index: 1
        insert: true
        image: "http://192.168.0.4/file_path/file.img"
      - index: 2
        insert: true
        image: "http://192.168.0.4/file_path/file.img"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Insert image file using HTTPS.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    force: true
    virtual_media:
      - index: 1
        insert: true
        image: "https://192.168.0.5/file_path/file.img"
        username: username
        password: password
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Eject multiple virtual media.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    force: true
    virtual_media:
      - index: 1
        insert: false
      - index: 2
        insert: false
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ejection of image file from Remote File Share 1.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    force: true
    virtual_media:
      insert: false
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Insertion and ejection of image file in single task.
  dellemc.openmanage.idrac_virtual_media:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    force: true
    virtual_media:
      - index: 1
        insert: true
        image: https://192.168.0.5/file/file.iso
        username: username
        password: password
      - index: 2
        insert: false

Inputs

    
force:
    default: false
    description: C(true) ejects the image file if already connected and inserts the file
      provided in I(image). This is applicable when I(insert) is C(true).
    type: bool

ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

idrac_ip:
    description: iDRAC IP Address.
    required: true
    type: str

idrac_port:
    default: 443
    description: iDRAC port.
    type: int

idrac_user:
    description:
    - iDRAC username.
    - If the username is not provided, then the environment variable C(IDRAC_USERNAME)
      is used.
    - 'Example: export IDRAC_USERNAME=username'
    required: true
    type: str

resource_id:
    description: Resource id of the iDRAC, if not specified manager collection id will
      be used.
    type: str

virtual_media:
    description: Details of the Remote File Share.
    elements: dict
    required: true
    suboptions:
      domain:
        description: Domain name of network share. This option is applicable for CIFS
          and HTTPS share.
        type: str
      image:
        description:
        - The path of the image file. The supported file types are .img and .iso.
        - The file name with .img extension is redirected as a virtual floppy and a file
          name with .iso extension is redirected as a virtual CDROM.
        - This option is required when I(insert) is C(true).
        - 'The following are the examples of the share location: CIFS share: //192.168.0.1/file_path/image_name.iso,
          NFS share: 192.168.0.2:/file_path/image_name.img, HTTP share: http://192.168.0.3/file_path/image_name.iso,
          HTTPS share: https://192.168.0.4/file_path/image_name.img'
        - CIFS share is not supported by iDRAC8.
        - HTTPS share with credentials is not supported by iDRAC8.
        type: path
      index:
        description:
        - Index of the Remote File Share. For example, to specify the Remote File Share
          1, the value of I(index) should be 1. If I(index) is not specified, the order
          of I(virtual_media) list will be considered.
        type: int
      insert:
        description:
        - C(true) connects the remote image file.
        - C(false) ejects the remote image file if connected.
        required: true
        type: bool
      media_type:
        choices:
        - CD
        - DVD
        - USBStick
        description: Type of the image file. This is applicable when I(insert) is C(true).
        type: str
      password:
        description:
        - Network share password. This option is applicable for CIFS and HTTPS share.
        - This module always reports as the changes found when I(password) is provided.
        type: str
      username:
        description: Network share username. This option is applicable for CIFS and HTTPS
          share.
        type: str
    type: list

idrac_password:
    aliases:
    - idrac_pwd
    description:
    - iDRAC user password.
    - If the password is not provided, then the environment variable C(IDRAC_PASSWORD)
      is used.
    - 'Example: export IDRAC_PASSWORD=password'
    required: true
    type: str

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

Outputs

error_info:
  description: Details of the HTTP Error.
  returned: on HTTP error
  sample:
    error:
      '@Message.ExtendedInfo':
      - Message: Unable to process the request because an error occurred.
        MessageArgs: []
        MessageId: GEN1234
        RelatedProperties: []
        Resolution: Retry the operation. If the issue persists, contact your system
          administrator.
        Severity: Critical
      code: Base.1.0.GeneralError
      message: A general error has occurred. See ExtendedInfo for more information.
  type: dict
msg:
  description: Successfully performed the virtual media operation.
  returned: success
  sample: Successfully performed the virtual media operation.
  type: str