Skip to content

Commit

Permalink
Release 2.0.11
Browse files Browse the repository at this point in the history
* The ome_application_network_webserver module allows the configuration of the network web server.
* The ome_application_network_time module allows the configuration of network time.
* The module ome_application_network_address is updated to include the following:
	- A specific NIC can be selected in case of multiple NICs,
	- A NIC can be enabled or disabled using the option enable_nic,
	- Support for the configuration of a management vLAN.
* The module idrac_firmware is enhanced to support FQDN input format for share details.

Co-Authored-By: Felix Stephen <[email protected]>
Co-Authored-By: Sajna Shetty <[email protected]>
  • Loading branch information
3 people committed Apr 22, 2020
1 parent 5839034 commit 077fba1
Show file tree
Hide file tree
Showing 39 changed files with 2,504 additions and 402 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ 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 simplifies and automates provisioning, deployment, and updates of PowerEdge servers and modular infrastructure. It allows system administrators and software developers to introduce the physical infrastructure provisioning into their software provisioning stack, integrate with existing DevOps pipelines and manage their infrastructure using version-controlled playbooks, server configuration profiles, and templates in line with the Infrastructure-as-Code (IaC) principles.

# 2.0.11 (April 20, 2020)

* The ome_application_network_webserver module allows the configuration of the network web server.

* The ome_application_network_time module allows the configuration of network time.

* The module ome_application_network_address is updated to include the following:
- A specific NIC can be selected in case of multiple NICs,
- A NIC can be enabled or disabled using the option enable_nic,
- Support for the configuration of a management vLAN.

* The module idrac_firmware is enhanced to support FQDN input format for
share details.

# 2.0.10 (March 27, 2020)

* The new OME module(ome_application_network_proxy) allows to configure a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'status': ['deprecated'],
'supported_by': 'community'}

DOCUMENTATION = r'''
---
module: dellemc_ome_job_facts
short_description: Get job details for a given job ID or entire job queue.
version_added: "2.9"
deprecated:
removed_in: "2.13"
why: Replaced with M(ome_job_info).
alternative: Use M(ome_job_info) instead.
description: This module retrieves job details for a given job ID or entire job queue.
options:
hostname:
Expand Down Expand Up @@ -182,6 +186,9 @@ def main():
},
supports_check_mode=False
)
module.deprecate("The 'dellemc_ome_job_facts' module has been deprecated. "
"Use 'ome_job_info' instead",
version=2.13)
joburi = "JobService/Jobs"
resp = None
try:
Expand Down
File renamed without changes.
23 changes: 17 additions & 6 deletions examples/idrac/idrac_firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,42 @@
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_password: "{{ idrac_password}}"
share_name: "{{ repo_share_name }}"
share_name: "https://downloads.dell.com"
reboot: True
job_wait: True
apply_update: True
catalog_file_name: "{{ catalog_file_name }}"

- name: Update firmware from repository on a internally hosted HTTP repository.
idrac_firmware:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_password: "{{ idrac_password}}"
share_name: "http://192.168.0.1/path_to_folder/"
reboot: True
job_wait: True
apply_update: True
catalog_file_name: "Catalog.xml"

- name: Update firmware from repository on a NFS Share
idrac_firmware:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_password: "{{ idrac_password}}"
share_name: "{{ share_name }}"
share_name: "192.168.0.1:/complete_share_path"
reboot: True
job_wait: True
apply_update: True
catalog_file_name: "{{ catalog_file_name }}"
catalog_file_name: "Catalog.xml"

- name: Update firmware from repository on a CIFS Share
idrac_firmware:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_password: "{{ idrac_password}}"
share_name: "{{ share_name }}"
share_name: "\\\\192.168.0.1\\share_path"
share_user: "{{ share_user }}"
share_password: "{{ share_password }}"
share_mnt: "/mnt/cifs_share"
reboot: False
job_wait: True
catalog_file_name: "{{ catalog_file_name }}"
catalog_file_name: "Catalog.xml"
27 changes: 23 additions & 4 deletions examples/ome/application/ome_application_network_address.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,40 @@
ipv6_configuration:
enable: true
enable_auto_configuration: true
static_ip_address: 2607:f2b1:f081:9:1c8c:f1c7:47e:f120
static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1
static_prefix_length: 10
static_gateway: ffff::2607:f2b1:f081:9
static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2
use_dhcp_for_dns_server_names: true
static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:1
static_alternate_dns_server: ""
static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3
static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4
reboot_delay: 10
tags:
- ipv6_config

- name: Management vLAN settings for primary interface
ome_application_network_address:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
management_vlan:
enable_vlan: true
vlan_id: 3344
dns_configuration:
register_with_dns: false
reboot_delay: 1
tags:
- mgmt_vlan

- name: DNS settings
ome_application_network_address:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
ipv4_configuration:
enable: true
use_dhcp_for_dns_server_names: false
static_preferred_dns_server: 192.168.0.4
static_alternate_dns_server: 192.168.0.5
dns_configuration:
register_with_dns: true
use_dhcp_for_dns_domain_name: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
- hosts: hosts
vars:
retries_count: 50
polling_interval: 5 # in seconds
connection: local
name: OME - Complete network settings with details tracking
gather_facts: False

tasks:
- name: Complete network settings
ome_application_network_address:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
ipv4_configuration:
enable: true
enable_dhcp: false
static_ip_address: 192.168.0.2
static_subnet_mask: 255.255.254.0
static_gateway: 192.168.0.3
use_dhcp_for_dns_server_names: false
static_preferred_dns_server: 192.168.0.4
static_alternate_dns_server: 192.168.0.5
ipv6_configuration:
enable: true
enable_auto_configuration: true
static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1
static_prefix_length: 10
static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2
use_dhcp_for_dns_server_names: true
static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3
static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4
dns_configuration:
register_with_dns: true
use_dhcp_for_dns_domain_name: false
dns_name: "MX-SVCTAG"
dns_domain_name: "localdomainname"
reboot_delay: 1
register: facts_result

# To end play when no job_info
- name: "End the play when no job_info"
meta: end_play
when:
- facts_result.changed == false
- "'job_info' not in facts_result"

- name: "Get job details using job id from network address config task."
ome_job_info:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
job_id: "{{ facts_result.job_info.Id }}"
register: job_result
failed_when: job_result.job_info.LastRunStatus.Name == 'Failed'
changed_when: job_result.job_info.LastRunStatus.Name == 'Completed'
until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed'
retries: "{{ retries_count }}"
delay: "{{ polling_interval }}"
28 changes: 28 additions & 0 deletions examples/ome/application/ome_application_network_time.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- hosts: hosts
connection: local
name: Dell OpenManage Ansible Application network time setting.
gather_facts: False

tasks:
- name: Configure system time.
ome_application_network_time:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
enable_ntp: false
system_time: "2020-03-31 21:35:18"
time_zone: "TZ_ID_11"
tags: time_setting1

- name: Configure NTP server for time synchronization.
ome_application_network_time:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
time_zone: "TZ_ID_66"
enable_ntp: true
primary_ntp_address: "192.168.0.2"
secondary_ntp_address1: "192.168.0.3"
secondary_ntp_address2: "192.168.0.4"
tags: time_setting2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
-
connection: local
gather_facts: false
hosts: hosts
name: "Ome application network time zone informaion - Ansible Module"
vars:
time_zone_uri: "/api/ApplicationService/Network/TimeZones"

tasks:
- name: "Get list of all available times zones along with information specific to each time zone."
uri:
url: "https://{{ baseuri }}{{ time_zone_uri }}"
user: "{{ username }}"
password: "{{ password }}"
method: "GET"
use_proxy: yes
status_code: 200
validate_certs: no
force_basic_auth: yes
register: time_zone_result
failed_when: "'value' not in time_zone_result.json"

- name: Get specific time zone ID using time zone name
with_items:
- "{{ time_zone_result.json.value }}"
debug:
msg: "{{item['Id']}}"
when: item['Name']=='(GMT+05:30) Sri Jayawardenepura'
34 changes: 34 additions & 0 deletions examples/ome/application/ome_application_network_webserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
- hosts: hosts
connection: local
name: Dell OME Application network webserver settings.
gather_facts: False

tasks:
- name: Update webserver port and session time out configuration.
ome_application_network_webserver:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
webserver_port: 443
webserver_timeout: 10
tags:
- port_timeout_update

- name: Update session time out
ome_application_network_webserver:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
webserver_timeout: 30
tags:
- timeout_update

- name: Update web server port.
ome_application_network_webserver:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
webserver_port: 8443
tags:
- port_update
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
- hosts: hosts
connection: local
name: "Dell OME Application network webserver port change and track web
server till the service restarts."
gather_facts: False
vars:
# 5 minutes wait max
retries_count: 30
polling_interval: 10
webserver_uri: "/api/ApplicationService/Network/WebServerConfiguration"

tasks:
# Update web server configuration
- name: Update webserver port and timeout of OME
ome_application_network_webserver:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
port: "{{ ome_webserver_port }}"
webserver_port: "{{ new_port }}"
webserver_timeout: 21
register: result

# To end play when no port change or failure
- name: "End the play when no port change"
meta: end_play
when:
- result.changed == false
- "'webserver_configuration' not in result"

# Loop till OME webserver is active by using the new port and webserver config GET call
- name: "Pause play until webserver URL is reachable from this host with new port"
uri:
url: "https://{{ hostname }}:{{ result.webserver_configuration.PortNumber
}}{{ webserver_uri }}"
user: "{{ username }}"
password: "{{ password }}"
method: "GET"
use_proxy: yes
return_content: yes
validate_certs: no
force_basic_auth: yes
headers:
Content-Type: "application/json"
Accept: "application/json"
register: webport_result
until: "'PortNumber' in webport_result or webport_result.status == 200"
retries: "{{ retries_count }}"
delay: "{{ polling_interval }}"

# Output the webserver_configuration values to be used further
- name: "Output the webserver config"
vars:
webserver_configuration: "{{ webport_result.json }}"
debug:
var: webserver_configuration
4 changes: 2 additions & 2 deletions examples/ome/firmware/catalog/ome_firmware_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
file_name: "catalog.gz"

- name: create catalog from CIFS network share.
dellemc_ome_job_facts:
ome_job_info:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
Expand All @@ -46,7 +46,7 @@
repository_domain: "{{ repository_domain }}"

- name: create catalog from NFS network share.
dellemc_ome_job_facts:
ome_job_info:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
failed_when: "'catalog_status' not in result"

- name: "Get job details using job id from ome firmware catalog creation."
dellemc_ome_job_facts:
ome_job_info:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
job_id: "{{ result.catalog_status.TaskId }}"
register: job_result
failed_when: "'job_facts' not in job_result"
until: job_result.job_facts.LastRunStatus.Name == 'Completed' or job_result.job_facts.LastRunStatus.Name == 'Failed'
failed_when: "'job_info' not in job_result"
until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed'
retries: "{{ retries_count }}"
delay: "{{ polling_interval }}"

Loading

0 comments on commit 077fba1

Please sign in to comment.