Skip to content

Commit

Permalink
Release 2.0.5
Browse files Browse the repository at this point in the history
Co-authored-by: jagadeeshnv <Jagadeesh_N_V@Dell.com>
Co-authored-by: felixs88 <Felix_S@Dell.com>
  • Loading branch information
3 people authored and Sajna Shetty committed Dec 17, 2019
1 parent 106b2b8 commit 7df6adc
Show file tree
Hide file tree
Showing 30 changed files with 2,684 additions and 56 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Dell EMC OpenManage Ansible Modules allows Data Center and IT administrators to

With the latest release of Dell EMC OpenManage Ansible Modules, the capabilities have improved with support for OpenManage Enterprise. OpenManage Ansible Modules allows users to retrieve device inventory information of each device discovered in the OpenManage Enterprise.

# 2.0.5 (December 13, 2019)

* OpenManage Ansible now allows the use of standard redfish URIs supported by iDRAC.

- The module (redfish_firmware) performs a component firmware update using an image file available on the local or remote system
- The module (redfish_storage_volume) manages the storage volume configuration.

* The iDRAC module (idrac_redfish_storage_controller) configures the settings of a storage controller.


# 2.0.4 (November 8, 2019)

* A new OpenManage Enterprise(OME) module (ome_firmware_catalog) to
Expand Down
82 changes: 82 additions & 0 deletions examples/idrac_redfish_storage_controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
- hosts: hosts
connection: local
name: Dell OpenManage Ansible iDRAC Redfish Storage Controller service.
gather_facts: False

tasks:
- name: Assign dedicated hot spare.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
volume_id:
- "Disk.Virtual.0:RAID.Slot.1-1"
target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
tags:
- assign_dedicated_hot_spare

- name: Assign global hot spare.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
tags:
- assign_global_hot_spare

- name: Set controller encryption key.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "SetControllerKey"
controller_id: "RAID.Slot.1-1"
key: "PassPhrase@123"
key_id: "mykeyid123"
tags:
- set_controller_key

- name: Rekey in LKM mode.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ReKey"
controller_id: "RAID.Slot.1-1"
key: "NewPassPhrase@123"
key_id: "newkeyid123"
old_key: "OldPassPhrase@123"
tags:
- rekey_lkm

- name: Rekey in SEKM mode.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ReKey"
controller_id: "RAID.Slot.1-1"
mode: "SEKM"
tags:
- rekey_sekm

- name: Remove controller key.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "RemoveControllerKey"
controller_id: "RAID.Slot.1-1"
tags:
- remove_controller_key

- name: Reset controller configuration.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ResetConfig"
controller_id: "RAID.Slot.1-1"
tags:
- reset_config
128 changes: 128 additions & 0 deletions examples/idrac_redfish_storage_controller_job_tracking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
- hosts: hosts
connection: local
name: iDRAC Redfish storage controller service with job tracking.
gather_facts: False
vars:
retries_count: 100
polling_interval: 10
all_ctrl_task_tags:
- assign_dedicated_hot_spare
- assign_global_hot_spare
- set_controller_key
- rekey_lkm
- rekey_sekm
- remove_controller_key
- reset_config

# Use a single tag to run each task with job tracker
tasks:
- name: Assign dedicated hot spare.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
volume_id:
- "Disk.Virtual.0:RAID.Slot.1-1"
target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
register: result
tags:
- assign_dedicated_hot_spare

- name: Assign global hot spare.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
register: result
tags:
- assign_global_hot_spare

- name: Set controller encryption key.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "SetControllerKey"
controller_id: "RAID.Slot.1-1"
key: "PassPhrase@123"
key_id: "mykeyid123"
register: result
tags:
- set_controller_key

- name: Rekey in LKM mode.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ReKey"
controller_id: "RAID.Slot.1-1"
key: "NewPassPhrase@123"
key_id: "newkeyid123"
old_key: "OldPassPhrase@123"
register: result
tags:
- rekey_lkm

- name: Rekey in SEKM mode.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ReKey"
controller_id: "RAID.Slot.1-1"
mode: "SEKM"
register: result
tags:
- rekey_sekm

- name: Remove controller key.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "RemoveControllerKey"
controller_id: "RAID.Slot.1-1"
register: result
tags:
- remove_controller_key

- name: Reset controller configuration.
idrac_redfish_storage_controller:
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
command: "ResetConfig"
controller_id: "RAID.Slot.1-1"
register: result
tags:
- reset_config

- name: "iDRAC Job tracking"
uri:
url: "https://{{ baseuri }}{{ result.task.uri }}"
user: "{{ username }}"
password: "{{ password }}"
method: "GET"
use_proxy: yes
status_code: 200, 202
return_content: yes
validate_certs: no
force_basic_auth: yes
headers:
Content-Type: "application/json"
Accept: "application/json"
register: result
until: result.json.JobState == 'Completed'
retries: "{{ retries_count }}"
delay: "{{ polling_interval }}"
tags: "{{ all_ctrl_task_tags }}"

- name: "iDRAC job result."
set_fact:
job_details: "{{ result.json }}"
failed_when: result.json.Message == "Failed"
changed_when: result.json.Message != "Failed"
tags: "{{ all_ctrl_task_tags }}"
53 changes: 36 additions & 17 deletions examples/ome_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
gather_facts: False

tasks:
- name: create template.
- name: "Create a template from a reference device."
ome_template:
hostname: "{{hostname}}"
username: "{{username}}"
Expand All @@ -15,7 +15,7 @@
Name: "New Template"
Description: "New Template description"

- name: modify template
- name: "Modify template name, description, and attribute value."
ome_template:
hostname: "{{hostname}}"
username: "{{username}}"
Expand All @@ -25,38 +25,57 @@
attributes:
Name: "New Custom Template"
Description: "Custom Template Description"
# Attributes to be modified in the template.
# For information on any attribute id, use API /TemplateService/Templates(Id)/Views(Id)/AttributeViewDetails
# This section is optional
Attributes:
- Id: 1234
Value: "Test Attribute"
IsIgnored: false

- name: deploy template.
- name: "Deploys template on multiple devices and changes the device level attributes. After the template is deployed,
an operating system can be installed using its image."
ome_template:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
state: "deploy"
template_id: 1234
device_id:
- 12345
- 45678
device_service_tag: ['SVTG123', 'SVTG456']
attributes: # All options for deploy operation
- 12765
- 10173
device_service_tag:
- 'SVTG123'
- 'SVTG456'
attributes:
# Device specific attributes to be modified during deployment.
# For information on any attribute id, use API /TemplateService/Templates(Id)/Views(Id)/AttributeViewDetails
# This section is optional
Attributes:
# specific device where attribute to be modified at deployment run-time.
# The DeviceId should be mentioned above in the 'device_id' section.
# Service tags not allowed.
- DeviceId: 12765
Attributes:
- Id : 15645
Value : "0.0.0.0"
IsIgnored : false
- DeviceId: 10173
Attributes:
- Id : 18968,
Value : "hostname-1"
IsIgnored : false
# Include this to install operating system on the devices.
# This section is optional
NetworkBootIsoModel:
BootToNetwork: false
ShareType: "NFS"
IsoPath: "bootToIsoPath.iso"
IsoPath: "/home/iso_path/filename.iso"
ShareDetail:
IpAddress: "192.168.0.2"
ShareName: "/nfsshare"
User: null
Password: null
Attributes:
- DeviceId: 12345
Attributes :
- Id : 123
Value : "0.0.0.0"
IsIgnored : true
ShareName: "sharename"
User: "share_user"
Password: "share_password"
Options:
EndHostPowerState: 1
ShutdownType: 0
Expand Down
Loading

0 comments on commit 7df6adc

Please sign in to comment.