esp / esp.bitbucket / 1.4.1 / module / bitbucket_repo_permissions Manage Bitbucket repository permissions | "added in version" 1.0.0 of esp.bitbucket" Authors: Krzysztof Lewandowski (@klewan)esp.bitbucket.bitbucket_repo_permissions (1.4.1) — module
Install with ansible-galaxy collection install esp.bitbucket:==1.4.1
collections: - name: esp.bitbucket version: 1.4.1
Promote or demote a group's or a users's permission level for the specified repository.
Authentication can be done with I(token) or with I(username) and I(password).
- name: Set REPO_WRITE permission level for the specified repository to jsmith user esp.bitbucket.bitbucket_repo_permissions: url: 'https://bitbucket.example.com' username: admin password: secrect project_key: FOO repository: bar user: jsmith permission: REPO_WRITE validate_certs: no
- name: Revoke all permissions for the specified repository from a group esp.bitbucket.bitbucket_repo_permissions: url: 'https://bitbucket.example.com' token: 'MjA2M...hqP58' project_key: FOO repository: bar group: dev-group permission: '' validate_certs: no
url: description: - Bitbucket Server URL. required: false type: str user: description: - Bitbucket user to grant or revoke permission from. - This is only needed when not using I(group). required: false type: str group: description: - Bitbucket group to grant or revoke permission from. - This is only needed when not using I(user). required: false type: str sleep: default: 5 description: - Number of seconds to sleep between API retries. type: int token: description: - Token parameter for authentication. - This is only needed when not using I(username) and I(password). required: false type: str retries: default: 3 description: - Number of retries to call Bitbucket API URL before failure. type: int password: description: - Password used for authentication. - This is only needed when not using I(token). - Required when I(username) is provided. required: false type: str username: description: - Username used for authentication. - This is only needed when not using I(token). - Required when I(password) is provided. required: false type: str use_proxy: default: true description: - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool permission: choices: - REPO_READ - REPO_WRITE - REPO_ADMIN - '' description: - The permission to grant. - Empty string '' means revoke all grants form a user or group. required: true type: str repository: aliases: - name description: - Repository name. required: true type: str project_key: aliases: - project description: - Bitbucket project key. required: true type: str validate_certs: default: true description: - If C(no), SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool
group: description: Bitbucket group to grant or revoke permission from. returned: success sample: dev-group type: str permission: description: The permission to grant. Empty string '' means revoke all grants form a user or group. returned: always sample: REPO_WRITE type: str project_key: description: Bitbucket project key. returned: always sample: FOO type: str repository: description: Bitbucket repository name. returned: always sample: bar type: str user: description: Bitbucket user to grant or revoke permission from. returned: success sample: jsmith type: str