Hi all, we would like to create a playbook to automate some tasks, like create projects, ApiKeys, roles etc using Ansible, by the moment i have not found specific info about how to connect an Atlas Org or project from ansible, is there a way to do it?, thansk for your help
Skip to main content
Hi Reply to myself, next workd fine,
- name: Create Project in Atlas
uri:
url: “https://cloud.mongodb.com/api/atlas/v1.0/groups?projectOwnerId={{ UAID.msg }}”
user: “{{ atlas_public_key }}”
password: “{{ atlas_private_key }}”
method: POST
body: ‘{ “name”: “{{name projeect}}”, “orgId”: “{{ atlas_OID }}” }’
force_basic_auth: no
status_code: [201, 409]
body_format: json
There are some modules for mongodb but nothing specific for Atlas. So yes, your using uri or writing your own module.
I don’t think there are endpoints for everything you’re wanting to do but there is quite a lot that is useful in the API.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
How to use mongosync with Atlas and Community Instance | 1 | 477 | Jun 2024 |
Change streams stopped receiving events after the MongoDB Atlas scheduled maintenance | 1 | 565 | Jul 2024 |
Does MongoDB Atlas for Azure support go mongodb driver 1.17+ and with it oidc? | 1 | 27 | Dec 2024 |
Unable to connect local env to Atlas: SSL/TSL Connection Issue | 17 | 182 | Feb 11 |
Trying to implement prompt caching using MongoDBCache in my RAG based document answering system but facing an issue | 1 | 35 | Feb 7 |