oracle.oci.oci_database_maintenance_run – Manage a MaintenanceRun resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 5.3.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 oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_database_maintenance_run.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to update a MaintenanceRun resource in Oracle Cloud Infrastructure

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
  • security_token
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
current_custom_action_timeout_in_mins
integer
The current custom action timeout between the current database servers during waiting state in addition to custom action timeout, from 0 (zero) to 30 minutes.
This parameter is updatable.
custom_action_timeout_in_mins
integer
Determines the amount of time the system will wait before the start of each database server patching operation. Specify a number of minutes from 15 to 120.
This parameter is updatable.
is_custom_action_timeout_enabled
boolean
    Choices:
  • no
  • yes
If true, enables the configuration of a custom action timeout (waiting period) between database servers patching operations.
This parameter is updatable.
is_enabled
boolean
    Choices:
  • no
  • yes
If `FALSE`, skips the maintenance run.
This parameter is updatable.
is_patch_now_enabled
boolean
    Choices:
  • no
  • yes
If set to `TRUE`, starts patching immediately.
This parameter is updatable.
is_resume_patching
boolean
    Choices:
  • no
  • yes
If true, then the patching is resumed and the next component will be patched immediately.
This parameter is updatable.
maintenance_run_id
string / required
The maintenance run OCID.

aliases: id
patch_id
string
The OCID of the patch to be applied in the maintenance run.
This parameter is updatable.
patching_mode
string
    Choices:
  • ROLLING
  • NONROLLING
Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.
*IMPORTANT*: Non-rolling infrastructure patching involves system down time. See Oracle-Managed Infrastructure Maintenance Updates for more information.
This parameter is updatable.
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
state
string
    Choices:
  • present ←
The state of the MaintenanceRun.
Use state=present to update an existing a MaintenanceRun.
target_db_server_version
string
The target database server system software version for the patching operation.
This parameter is updatable.
target_storage_server_version
string
The target storage cell system software version for the patching operation.
This parameter is updatable.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
time_scheduled
string
The scheduled date and time of the maintenance run to update.
This parameter is updatable.
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Update maintenance_run
  oci_database_maintenance_run:
    # required
    maintenance_run_id: "ocid1.maintenancerun.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    is_enabled: true
    time_scheduled: time_scheduled_example
    is_patch_now_enabled: true
    patch_id: "ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx"
    patching_mode: ROLLING
    is_custom_action_timeout_enabled: true
    custom_action_timeout_in_mins: 56
    current_custom_action_timeout_in_mins: 56
    is_resume_patching: true
    target_db_server_version: target_db_server_version_example
    target_storage_server_version: target_storage_server_version_example

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
maintenance_run
complex
on success
Details of the MaintenanceRun resource acted upon by the current operation

Sample:
{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'current_custom_action_timeout_in_mins': 56, 'current_patching_component': 'current_patching_component_example', 'custom_action_timeout_in_mins': 56, 'description': 'description_example', 'display_name': 'display_name_example', 'estimated_component_patching_start_time': '2013-10-20T19:20:30+01:00', 'estimated_patching_time': {'estimated_db_server_patching_time': 56, 'estimated_network_switches_patching_time': 56, 'estimated_storage_server_patching_time': 56, 'total_estimated_patching_time': 56}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_custom_action_timeout_enabled': True, 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'SCHEDULED', 'maintenance_subtype': 'QUARTERLY', 'maintenance_type': 'PLANNED', 'patch_failure_count': 56, 'patch_id': 'ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx', 'patching_end_time': '2013-10-20T19:20:30+01:00', 'patching_mode': 'ROLLING', 'patching_start_time': '2013-10-20T19:20:30+01:00', 'patching_status': 'PATCHING', 'peer_maintenance_run_id': 'ocid1.peermaintenancerun.oc1..xxxxxxEXAMPLExxxxxx', 'target_db_server_version': 'target_db_server_version_example', 'target_resource_id': 'ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx', 'target_resource_type': 'AUTONOMOUS_EXADATA_INFRASTRUCTURE', 'target_storage_server_version': 'target_storage_server_version_example', 'time_ended': '2013-10-20T19:20:30+01:00', 'time_scheduled': '2013-10-20T19:20:30+01:00', 'time_started': '2013-10-20T19:20:30+01:00'}
 
compartment_id
string
on success
The OCID of the compartment.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
current_custom_action_timeout_in_mins
integer
on success
Extend current custom action timeout between the current database servers during waiting state, from 0 (zero) to 30 minutes.

Sample:
56
 
current_patching_component
string
on success
The name of the current infrastruture component that is getting patched.

Sample:
current_patching_component_example
 
custom_action_timeout_in_mins
integer
on success
Determines the amount of time the system will wait before the start of each database server patching operation. Specify a number of minutes, from 15 to 120.

Sample:
56
 
description
string
on success
Description of the maintenance run.

Sample:
description_example
 
display_name
string
on success
The user-friendly name for the maintenance run.

Sample:
display_name_example
 
estimated_component_patching_start_time
string
on success
The estimated start time of the next infrastruture component patching operation.

Sample:
2013-10-20T19:20:30+01:00
 
estimated_patching_time
complex
on success

   
estimated_db_server_patching_time
integer
on success
The estimated time required in minutes for database server patching.

Sample:
56
   
estimated_network_switches_patching_time
integer
on success
The estimated time required in minutes for network switch patching.

Sample:
56
   
estimated_storage_server_patching_time
integer
on success
The estimated time required in minutes for storage server patching.

Sample:
56
   
total_estimated_patching_time
integer
on success
The estimated total time required in minutes for all patching operations.

Sample:
56
 
id
string
on success
The OCID of the maintenance run.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_custom_action_timeout_enabled
boolean
on success
If true, enables the configuration of a custom action timeout (waiting period) between database servers patching operations.

Sample:
True
 
lifecycle_details
string
on success
Additional information about the current lifecycle state.

Sample:
lifecycle_details_example
 
lifecycle_state
string
on success
The current state of the maintenance run. For Autonomous Database Serverless instances, valid states are IN_PROGRESS, SUCCEEDED, and FAILED.

Sample:
SCHEDULED
 
maintenance_subtype
string
on success
Maintenance sub-type.

Sample:
QUARTERLY
 
maintenance_type
string
on success
Maintenance type.

Sample:
PLANNED
 
patch_failure_count
integer
on success
Contain the patch failure count.

Sample:
56
 
patch_id
string
on success
The unique identifier of the patch. The identifier string includes the patch type, the Oracle Database version, and the patch creation date (using the format YYMMDD). For example, the identifier `ru_patch_19.9.0.0_201030` is used for an RU patch for Oracle Database 19.9.0.0 that was released October 30, 2020.

Sample:
ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx
 
patching_end_time
string
on success
The time when the patching operation ended.

Sample:
2013-10-20T19:20:30+01:00
 
patching_mode
string
on success
Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.
*IMPORTANT*: Non-rolling infrastructure patching involves system down time. See Oracle-Managed Infrastructure Maintenance Updates for more information.

Sample:
ROLLING
 
patching_start_time
string
on success
The time when the patching operation started.

Sample:
2013-10-20T19:20:30+01:00
 
patching_status
string
on success
The status of the patching operation.

Sample:
PATCHING
 
peer_maintenance_run_id
string
on success
The OCID of the maintenance run for the Autonomous Data Guard association's peer container database.

Sample:
ocid1.peermaintenancerun.oc1..xxxxxxEXAMPLExxxxxx
 
target_db_server_version
string
on success
The target software version for the database server patching operation.

Sample:
target_db_server_version_example
 
target_resource_id
string
on success
The ID of the target resource on which the maintenance run occurs.

Sample:
ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx
 
target_resource_type
string
on success
The type of the target resource on which the maintenance run occurs.

Sample:
AUTONOMOUS_EXADATA_INFRASTRUCTURE
 
target_storage_server_version
string
on success
The target Cell version that is to be patched to.

Sample:
target_storage_server_version_example
 
time_ended
string
on success
The date and time the maintenance run was completed.

Sample:
2013-10-20T19:20:30+01:00
 
time_scheduled
string
on success
The date and time the maintenance run is scheduled to occur.

Sample:
2013-10-20T19:20:30+01:00
 
time_started
string
on success
The date and time the maintenance run starts.

Sample:
2013-10-20T19:20:30+01:00


Authors

  • Oracle (@oracle)