t_systems_mms / t_systems_mms.mongodb_atlas / 0.3.3 / module / atlas_ldap_user Manage database users in Atlas Authors: Martin Schurz (@schurzi) / Derek Giri preview | supported by communityt_systems_mms.mongodb_atlas.atlas_ldap_user (0.3.3) — module
Install with ansible-galaxy collection install t_systems_mms.mongodb_atlas:==0.3.3
collections: - name: t_systems_mms.mongodb_atlas version: 0.3.3
The atlas_ldap_user module lets you create LDAP groups on the admin database by mapping LDAP groups to MongoDB roles on your Atlas databases.
Each user or group has a set of roles that provide access to the project's databases.
L(API Documentation,https://docs.atlas.mongodb.com/security-ldaps/)
- name: LDAP Group or Username atlas_ldap_user: apiUsername: "API_user" apiPassword: "API_passwort_or_token" atlas_ldap_user: "USER DN or GROUP DN" groupId: "GROUP_ID" databaseName: "admin" username: my_app_user roles: - databaseName: private_info roleName: read - databaseName: public_info roleName: readWrite
roles: description: - Array of this user's roles and the databases / collections on which the roles apply. - A role must include folliwing elements elements: dict required: true suboptions: databaseName: description: - Database on which the user has the specified role. - A role on the admin database can include privileges that apply to the other databases. required: true type: str roleName: description: - Name of the role. This value can either be a built-in role or a custom role. required: true type: str type: list state: choices: - present - absent default: present description: - State of the ressource. type: str groupId: description: - Unique identifier for the Atlas project. required: true type: str username: description: - Username for authenticating to MongoDB. required: true type: str 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 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 databaseName: choices: - admin - $external default: admin description: - Database against which Atlas authenticates the user. type: str ldapAuthType: choices: - GROUP - USER default: GROUP description: - Type of LDAP authorization for the user i.e. USER or GROUP type: str