| 1 |
.. _ome_application_network_time_module: |
| 2 |
|
| 3 |
|
| 4 |
ome_application_network_time -- Updates the network time on OpenManage Enterprise |
| 5 |
================================================================================= |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows the configuration of network time on OpenManage Enterprise. |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
The below requirements are needed on the host that executes this module. |
| 22 |
|
| 23 |
- python \>= 3.9.6 |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
Parameters |
| 28 |
---------- |
| 29 |
|
| 30 |
enable_ntp (True, bool, None) |
| 31 |
Enables or disables Network Time Protocol(NTP). |
| 32 |
|
| 33 |
If \ :emphasis:`enable\_ntp`\ is false, then the NTP addresses reset to their default values. |
| 34 |
|
| 35 |
|
| 36 |
system_time (optional, str, None) |
| 37 |
Time in the current system. |
| 38 |
|
| 39 |
This option is only applicable when \ :emphasis:`enable\_ntp`\ is false. |
| 40 |
|
| 41 |
This option must be provided in following format 'yyyy-mm-dd hh:mm:ss'. |
| 42 |
|
| 43 |
|
| 44 |
time_zone (optional, str, None) |
| 45 |
The valid timezone ID to be used. |
| 46 |
|
| 47 |
This option is applicable for both system time and NTP time synchronization. |
| 48 |
|
| 49 |
|
| 50 |
primary_ntp_address (optional, str, None) |
| 51 |
The primary NTP address. |
| 52 |
|
| 53 |
This option is applicable when \ :emphasis:`enable\_ntp`\ is true. |
| 54 |
|
| 55 |
|
| 56 |
secondary_ntp_address1 (optional, str, None) |
| 57 |
The first secondary NTP address. |
| 58 |
|
| 59 |
This option is applicable when \ :emphasis:`enable\_ntp`\ is true. |
| 60 |
|
| 61 |
|
| 62 |
secondary_ntp_address2 (optional, str, None) |
| 63 |
The second secondary NTP address. |
| 64 |
|
| 65 |
This option is applicable when \ :emphasis:`enable\_ntp`\ is true. |
| 66 |
|
| 67 |
|
| 68 |
hostname (True, str, None) |
| 69 |
OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. |
| 70 |
|
| 71 |
|
| 72 |
username (False, str, None) |
| 73 |
OpenManage Enterprise or OpenManage Enterprise Modular username. |
| 74 |
|
| 75 |
If the username is not provided, then the environment variable \ :envvar:`OME\_USERNAME`\ is used. |
| 76 |
|
| 77 |
Example: export OME\_USERNAME=username |
| 78 |
|
| 79 |
|
| 80 |
password (False, str, None) |
| 81 |
OpenManage Enterprise or OpenManage Enterprise Modular password. |
| 82 |
|
| 83 |
If the password is not provided, then the environment variable \ :envvar:`OME\_PASSWORD`\ is used. |
| 84 |
|
| 85 |
Example: export OME\_PASSWORD=password |
| 86 |
|
| 87 |
|
| 88 |
x_auth_token (False, str, None) |
| 89 |
Authentication token. |
| 90 |
|
| 91 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`OME\_X\_AUTH\_TOKEN`\ is used. |
| 92 |
|
| 93 |
Example: export OME\_X\_AUTH\_TOKEN=x\_auth\_token |
| 94 |
|
| 95 |
|
| 96 |
port (optional, int, 443) |
| 97 |
OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. |
| 98 |
|
| 99 |
|
| 100 |
validate_certs (optional, bool, True) |
| 101 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 102 |
|
| 103 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 104 |
|
| 105 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 106 |
|
| 107 |
|
| 108 |
ca_path (optional, path, None) |
| 109 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 110 |
|
| 111 |
|
| 112 |
timeout (optional, int, 30) |
| 113 |
The socket level timeout in seconds. |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
Notes |
| 120 |
----- |
| 121 |
|
| 122 |
.. note:: |
| 123 |
- Run this module from a system that has direct access to Dell OpenManage Enterprise. |
| 124 |
- This module supports \ :literal:`check\_mode`\ . |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
Examples |
| 130 |
-------- |
| 131 |
|
| 132 |
.. code-block:: yaml+jinja |
| 133 |
|
| 134 |
|
| 135 |
--- |
| 136 |
- name: Configure system time |
| 137 |
dellemc.openmanage.ome_application_network_time: |
| 138 |
hostname: "192.168.0.1" |
| 139 |
username: "username" |
| 140 |
password: "password" |
| 141 |
ca_path: "/path/to/ca_cert.pem" |
| 142 |
enable_ntp: false |
| 143 |
system_time: "2020-03-31 21:35:18" |
| 144 |
time_zone: "TZ_ID_11" |
| 145 |
|
| 146 |
- name: Configure NTP server for time synchronization |
| 147 |
dellemc.openmanage.ome_application_network_time: |
| 148 |
hostname: "192.168.0.1" |
| 149 |
username: "username" |
| 150 |
password: "password" |
| 151 |
ca_path: "/path/to/ca_cert.pem" |
| 152 |
enable_ntp: true |
| 153 |
time_zone: "TZ_ID_66" |
| 154 |
primary_ntp_address: "192.168.0.2" |
| 155 |
secondary_ntp_address1: "192.168.0.2" |
| 156 |
secondary_ntp_address2: "192.168.0.4" |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
Return Values |
| 161 |
------------- |
| 162 |
|
| 163 |
msg (always, str, Successfully configured network time.) |
| 164 |
Overall status of the network time configuration change. |
| 165 |
|
| 166 |
|
| 167 |
proxy_configuration (success, dict, {'EnableNTP': False, 'JobId': None, 'PrimaryNTPAddress': None, 'SecondaryNTPAddress1': None, 'SecondaryNTPAddress2': None, 'SystemTime': None, 'TimeSource': 'Local Clock', 'TimeZone': 'TZ_ID_1', 'TimeZoneIdLinux': None, 'TimeZoneIdWindows': None, 'UtcTime': None}) |
| 168 |
Updated application network time configuration. |
| 169 |
|
| 170 |
|
| 171 |
error_info (on HTTP error, dict, {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to complete the request because the input value for SystemTime is missing or an invalid value is entered.', 'MessageArgs': ['SystemTime'], 'MessageId': 'CGEN6002', 'RelatedProperties': [], 'Resolution': 'Enter a valid value and retry the operation.', 'Severity': 'Critical'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}}) |
| 172 |
Details of the HTTP error. |
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
Status |
| 179 |
------ |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
Authors |
| 186 |
~~~~~~~ |
| 187 |
|
| 188 |
- Sajna Shetty(@Sajna-Shetty) |
| 189 |
- Mangirish Kenkare(@MangirishK) |
| 190 |
|