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 |
---|---|---|---|
Unable to use/manipulate realmresults in flutter | 1 | 540 | May 2024 |
createSearchIndex is not working from mongosh connected from window machine | 4 | 748 | May 2024 |
Serveless instance questions | 1 | 525 | May 2024 |
MONGODB-AWS auth method in FIPS-mode | 1 | 233 | Jun 2024 |
Can’t download json file of my collection? | 1 | 35 | Feb 25 |