oracle / oracle.oci / 2.38.0 / module / oci_database_db_system_actions Perform actions on a DbSystem resource in Oracle Cloud Infrastructure | "added in version" 2.9.0 of oracle.oci" Authors: Oracle (@oracle) preview | supported by communityoracle.oci.oci_database_db_system_actions (2.38.0) — module
Install with ansible-galaxy collection install oracle.oci:==2.38.0
collections: - name: oracle.oci version: 2.38.0
Perform actions on a DbSystem resource in Oracle Cloud Infrastructure
For I(action=change_compartment), moves the DB system and its dependent resources to the specified compartment. For more information about moving DB systems, see L(Moving Database Resources to a Different Compartment,https://docs.cloud.oracle.com/Content/Database/Concepts/databaseoverview.htm#moveRes).
For I(action=migrate_exadata_db_system_resource_model), migrates the Exadata DB system to the new L(Exadata resource model,https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model). All related resources will be migrated.
- name: Perform action change_compartment on db_system oci_database_db_system_actions: # required compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx" db_system_id: "ocid1.dbsystem.oc1..xxxxxxEXAMPLExxxxxx" action: change_compartment
- name: Perform action migrate_exadata_db_system_resource_model on db_system oci_database_db_system_actions: # required db_system_id: "ocid1.dbsystem.oc1..xxxxxxEXAMPLExxxxxx" action: migrate_exadata_db_system_resource_model
wait: default: true description: Whether to wait for create or delete operation to complete. type: bool action: choices: - change_compartment - migrate_exadata_db_system_resource_model description: - The action to perform on the DbSystem. required: true type: str region: description: - 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 C(config_file_location)). Please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm) for more information on OCI regions. type: str tenancy: description: - 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 C(config_file_location)). To get the tenancy OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) type: str api_user: description: - 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 C(config_file_location)). To get the user's OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm). type: str auth_type: choices: - api_key - instance_principal - instance_obo_user - resource_principal default: api_key description: - The type of authentication to use for making API requests. By default C(auth_type="api_key") based authentication is performed and the API key (see I(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 C(auth_type="instance_principal") to use instance principal based authentication when running ansible playbooks within an OCI compute instance. type: str db_system_id: aliases: - id description: - The DB system L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). required: true type: str wait_timeout: description: Time, in seconds, to wait when I(wait=yes). Defaults to 1200 for most of the services but some services might have a longer wait timeout. type: int compartment_id: description: - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. - Required for I(action=change_compartment). type: str api_user_key_file: description: - 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 C(config_file_location)). If the key is encrypted with a pass-phrase, the C(api_user_key_pass_phrase) option must also be provided. type: str config_profile_name: description: - The profile to load from the config file referenced by C(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 C(config_file_location). type: str api_user_fingerprint: description: - 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 C(config_file_location)). To get the key pair's fingerprint value please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm). type: str config_file_location: description: - 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. type: str api_user_key_pass_phrase: description: - Passphrase used by the key referenced in C(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 C(config_file_location)). type: str
db_system: contains: availability_domain: description: - The name of the availability domain that the DB system is located in. returned: on success sample: Uocm:PHX-AD-1 type: str backup_network_nsg_ids: description: - A list of the L(OCIDs,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see L(Security Rules,https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. returned: on success sample: [] type: list backup_subnet_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet the DB system is associated with. Applicable only to Exadata DB systems. - '**Subnet Restriction:** See the subnet restrictions information for **subnetId**.' returned: on success sample: ocid1.backupsubnet.oc1..xxxxxxEXAMPLExxxxxx type: str cluster_name: description: - The cluster name for Exadata and 2-node RAC virtual machine DB systems. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. returned: on success sample: cluster_name_example type: str compartment_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. returned: on success sample: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx type: str cpu_core_count: description: - The number of CPU cores enabled on the DB system. returned: on success sample: 56 type: int data_storage_percentage: description: - The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 40 and 80. The default is 80 percent assigned to DATA storage. Not applicable for virtual machine DB systems. returned: on success sample: 56 type: int data_storage_size_in_gbs: description: - The data storage size, in gigabytes, that is currently available to the DB system. Applies only for virtual machine DB systems. returned: on success sample: 56 type: int database_edition: description: - The Oracle Database edition that applies to all the databases on the DB system. returned: on success sample: STANDARD_EDITION type: str db_system_options: contains: storage_management: description: - The storage option used in DB system. ASM - Automatic storage management LVM - Logical Volume management returned: on success sample: ASM type: str description: - '' returned: on success type: complex defined_tags: description: - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see L(Resource Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). returned: on success sample: Operations: CostCenter: US type: dict disk_redundancy: description: - The type of redundancy configured for the DB system. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. returned: on success sample: HIGH type: str display_name: description: - The user-friendly name for the DB system. The name does not have to be unique. returned: on success sample: display_name_example type: str domain: description: - The domain name for the DB system. returned: on success sample: domain_example type: str fault_domains: description: - List of the Fault Domains in which this DB system is provisioned. returned: on success sample: [] type: list freeform_tags: description: - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see L(Resource Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). - 'Example: `{"Department": "Finance"}`' returned: on success sample: Department: Finance type: dict hostname: description: - The hostname for the DB system. returned: on success sample: hostname_example type: str id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. returned: on success sample: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx type: str iorm_config_cache: contains: db_plans: contains: db_name: description: - The database name. For the default `DbPlan`, the `dbName` is `default`. returned: on success sample: db_name_example type: str flash_cache_limit: description: - The flash cache limit for this database. This value is internally configured based on the share value assigned to the database. returned: on success sample: flash_cache_limit_example type: str share: description: - The relative priority of this database. returned: on success sample: 56 type: int description: - An array of IORM settings for all the database in the Exadata DB system. returned: on success type: complex lifecycle_details: description: - Additional information about the current `lifecycleState`. returned: on success sample: lifecycle_details_example type: str lifecycle_state: description: - The current state of IORM configuration for the Exadata DB system. returned: on success sample: BOOTSTRAPPING type: str objective: description: - The current value for the IORM objective. The default is `AUTO`. returned: on success sample: LOW_LATENCY type: str description: - '' returned: on success type: complex kms_key_id: description: - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. returned: on success sample: ocid1.kmskey.oc1..xxxxxxEXAMPLExxxxxx type: str last_maintenance_run_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance run. returned: on success sample: ocid1.lastmaintenancerun.oc1..xxxxxxEXAMPLExxxxxx type: str last_patch_history_entry_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last patch history. This value is updated as soon as a patch operation starts. returned: on success sample: ocid1.lastpatchhistoryentry.oc1..xxxxxxEXAMPLExxxxxx type: str license_model: description: - The Oracle license model that applies to all the databases on the DB system. The default is LICENSE_INCLUDED. returned: on success sample: LICENSE_INCLUDED type: str lifecycle_details: description: - Additional information about the current lifecycle state. returned: on success sample: lifecycle_details_example type: str lifecycle_state: description: - The current state of the DB system. returned: on success sample: PROVISIONING type: str listener_port: description: - The port number configured for the listener on the DB system. returned: on success sample: 56 type: int maintenance_window: contains: days_of_week: contains: name: description: - Name of the day of the week. returned: on success sample: MONDAY type: str description: - Days during the week when maintenance should be performed. returned: on success type: complex hours_of_day: description: - The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC returned: on success sample: [] type: list lead_time_in_weeks: description: - Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. returned: on success sample: 56 type: int months: contains: name: description: - Name of the month of the year. returned: on success sample: JANUARY type: str description: - Months during the year when maintenance should be performed. returned: on success type: complex preference: description: - The maintenance window scheduling preference. returned: on success sample: NO_PREFERENCE type: str weeks_of_month: description: - Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. returned: on success sample: [] type: list description: - '' returned: on success type: complex next_maintenance_run_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the next maintenance run. returned: on success sample: ocid1.nextmaintenancerun.oc1..xxxxxxEXAMPLExxxxxx type: str node_count: description: - The number of nodes in the DB system. For RAC DB systems, the value is greater than 1. returned: on success sample: 56 type: int nsg_ids: description: - A list of the L(OCIDs,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this resource belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see L(Security Rules,https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:** - Autonomous Databases with private access require at least 1 Network Security Group (NSG). The nsgIds array cannot be empty. returned: on success sample: [] type: list point_in_time_data_disk_clone_timestamp: description: - The point in time for a cloned database system when the data disks were cloned from the source database system, as described in L(RFC 3339,https://tools.ietf.org/rfc/rfc3339). returned: on success sample: '2013-10-20T19:20:30+01:00' type: str reco_storage_size_in_gb: description: - The RECO/REDO storage size, in gigabytes, that is currently allocated to the DB system. Applies only for virtual machine DB systems. returned: on success sample: 56 type: int scan_dns_name: description: - The FQDN of the DNS record for the SCAN IP addresses that are associated with the DB system. returned: on success sample: scan_dns_name_example type: str scan_dns_record_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the DB system. returned: on success sample: ocid1.scandnsrecord.oc1..xxxxxxEXAMPLExxxxxx type: str scan_ip_ids: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the DB system. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. - '**Note:** For a single-node DB system, this list is empty.' returned: on success sample: [] type: list shape: description: - The shape of the DB system. The shape determines resources to allocate to the DB system. - For virtual machine shapes, the number of CPU cores and memory - For bare metal and Exadata shapes, the number of CPU cores, storage, and memory returned: on success sample: shape_example type: str source_db_system_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. returned: on success sample: ocid1.sourcedbsystem.oc1..xxxxxxEXAMPLExxxxxx type: str sparse_diskgroup: description: - True, if Sparse Diskgroup is configured for Exadata dbsystem, False, if Sparse diskgroup was not configured. returned: on success sample: true type: bool ssh_public_keys: description: - The public key portion of one or more key pairs used for SSH access to the DB system. returned: on success sample: - ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz... type: list subnet_id: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the DB system is associated with. - '**Subnet Restrictions:** - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20.' - These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet. returned: on success sample: ocid1.subnet.oc1..xxxxxxEXAMPLExxxxxx type: str time_created: description: - The date and time the DB system was created. returned: on success sample: '2013-10-20T19:20:30+01:00' type: str time_zone: description: - The time zone of the DB system. For details, see L(DB System Time Zones,https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). returned: on success sample: time_zone_example type: str version: description: - The Oracle Database version of the DB system. returned: on success sample: version_example type: str vip_ids: description: - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the DB system. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the DB system to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. - '**Note:** For a single-node DB system, this list is empty.' returned: on success sample: [] type: list zone_id: description: - The OCID of the zone the DB system is associated with. returned: on success sample: ocid1.zone.oc1..xxxxxxEXAMPLExxxxxx type: str description: - Details of the DbSystem resource acted upon by the current operation returned: on success sample: availability_domain: Uocm:PHX-AD-1 backup_network_nsg_ids: [] backup_subnet_id: ocid1.backupsubnet.oc1..xxxxxxEXAMPLExxxxxx cluster_name: cluster_name_example compartment_id: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx cpu_core_count: 56 data_storage_percentage: 56 data_storage_size_in_gbs: 56 database_edition: STANDARD_EDITION db_system_options: storage_management: ASM defined_tags: Operations: CostCenter: US disk_redundancy: HIGH display_name: display_name_example domain: domain_example fault_domains: [] freeform_tags: Department: Finance hostname: hostname_example id: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx iorm_config_cache: db_plans: - db_name: db_name_example flash_cache_limit: flash_cache_limit_example share: 56 lifecycle_details: lifecycle_details_example lifecycle_state: BOOTSTRAPPING objective: LOW_LATENCY kms_key_id: ocid1.kmskey.oc1..xxxxxxEXAMPLExxxxxx last_maintenance_run_id: ocid1.lastmaintenancerun.oc1..xxxxxxEXAMPLExxxxxx last_patch_history_entry_id: ocid1.lastpatchhistoryentry.oc1..xxxxxxEXAMPLExxxxxx license_model: LICENSE_INCLUDED lifecycle_details: lifecycle_details_example lifecycle_state: PROVISIONING listener_port: 56 maintenance_window: days_of_week: - name: MONDAY hours_of_day: [] lead_time_in_weeks: 56 months: - name: JANUARY preference: NO_PREFERENCE weeks_of_month: [] next_maintenance_run_id: ocid1.nextmaintenancerun.oc1..xxxxxxEXAMPLExxxxxx node_count: 56 nsg_ids: [] point_in_time_data_disk_clone_timestamp: '2013-10-20T19:20:30+01:00' reco_storage_size_in_gb: 56 scan_dns_name: scan_dns_name_example scan_dns_record_id: ocid1.scandnsrecord.oc1..xxxxxxEXAMPLExxxxxx scan_ip_ids: [] shape: shape_example source_db_system_id: ocid1.sourcedbsystem.oc1..xxxxxxEXAMPLExxxxxx sparse_diskgroup: true ssh_public_keys: - ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz... subnet_id: ocid1.subnet.oc1..xxxxxxEXAMPLExxxxxx time_created: '2013-10-20T19:20:30+01:00' time_zone: time_zone_example version: version_example vip_ids: [] zone_id: ocid1.zone.oc1..xxxxxxEXAMPLExxxxxx type: complex