community / community.mongodb / 1.7.3 / module / mongodb_atlas_cluster Manage database clusters in Atlas Authors: Martin Schurz (@schurzi)community.mongodb.mongodb_atlas_cluster (1.7.3) — module
Install with ansible-galaxy collection install community.mongodb:==1.7.3
collections: - name: community.mongodb version: 1.7.3
The clusters module provides access to your cluster configurations.
The module lets you create, edit and delete clusters.
L(API Documentation,https://docs.atlas.mongodb.com/reference/api/clusters/)
- name: test cluster community.mongodb.mongodb_atlas_cluster: api_username: "API_user" api_password: "API_passwort_or_token" group_id: "GROUP_ID" name: "testcluster" mongo_db_major_version: "4.0" cluster_type: "REPLICASET" provider_settings: provider_name: "GCP" region_name: "EUROPE_WEST_3" instance_size_name: "M10"
name: description: - Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. required: true type: str state: choices: - present - absent default: present description: - State of the ressource. type: str group_id: aliases: - groupId description: - Unique identifier for the Atlas project. required: true type: str pit_enabled: aliases: - pitEnabled description: - Flag that indicates the cluster uses continuous cloud backups. type: bool api_password: aliases: - apiPassword description: - The password for use in authentication with the Atlas API. - Can use API users and tokens (private key is password) required: true type: str api_username: aliases: - apiUsername description: - The username for use in authentication with the Atlas API. - Can use API users and tokens (public key is username) required: true type: str auto_scaling: aliases: - autoScaling description: - Configure your cluster to automatically scale its storage and cluster tier. required: false suboptions: disk_gb_enabled: aliases: - diskGBEnabled description: - Specifies whether disk auto-scaling is enabled. The default is true. type: bool type: dict cluster_type: aliases: - clusterType choices: - REPLICASET - SHARDED default: REPLICASET description: - Type of the cluster that you want to create. type: str disk_size_gb: aliases: - diskSizeGB description: - Capacity, in gigabytes, of the host's root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. type: int provider_settings: aliases: - providerSettings description: - Configuration for the provisioned servers on which MongoDB runs. - The available options are specific to the cloud service provider. required: true suboptions: instance_size_name: aliases: - instanceSizeName description: - Atlas provides different cluster tiers, each with a default storage capacity and RAM size. - The cluster you select is used for all the data-bearing servers in your cluster tier. required: true type: str provider_name: aliases: - providerName description: - Cloud service provider on which the servers are provisioned. required: true type: str region_name: aliases: - regionName description: - Physical location of your MongoDB cluster. required: true type: str type: dict replication_factor: aliases: - replicationFactor choices: - 3 - 5 - 7 default: 3 description: - Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. type: int mongo_db_major_version: aliases: - mongoDBMajorVersion choices: - '4.2' - '4.4' - '5.0' - '6.0' - '7.0' description: - Version of the cluster to deploy. - Atlas always deploys the cluster with the latest stable release of the specified version. - You can upgrade to a newer version of MongoDB when you modify a cluster. type: str provider_backup_enabled: aliases: - providerBackupEnabled description: - Flag that indicates if the cluster uses Cloud Backups for backups. type: bool