esp.bitbucket.bitbucket_repo_reviewer (1.4.1) — module

Manage default reviewer setting on repository level

| "added in version" 1.0.0 of esp.bitbucket"

Authors: Pawel Smolarz (pawel.smolarz@nordea.com)

Install collection

Install with ansible-galaxy collection install esp.bitbucket:==1.4.1


Add to requirements.yml

  collections:
    - name: esp.bitbucket
      version: 1.4.1

Description

Configure default reviewers for repository

Only repositories for which the authenticated user has the admin rights can be managed.

Authentication can be done with I(token) or with I(username) and I(password).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure default reviewer globally on AIMT project for master branch
  esp.bitbucket.bitbucket_repo_reviewer:
    url: 'https://bitbucket.example.com'
    username: jsmith
    password: secrect
    project_key: 'AIMT'
    validate_certs: no
    reviewers: [user1]
    branch: 'master'

Inputs

    
url:
    description:
    - Bitbucket Server URL.
    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

branch:
    default: master
    description:
    - Branch name
    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:
    aliases:
    - user
    description:
    - Username used for authentication.
    - This is only needed when not using I(token).
    - Required when I(password) is provided.
    required: false
    type: str

approvals:
    default: 0
    description:
    - Number of approvals required
    required: false
    type: str

reviewers:
    description:
    - List of project default reviewers
    required: true
    type: list

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

repository:
    description:
    - Repository name.
    required: true
    type: str

project_key:
    aliases:
    - project
    description:
    - Retrieve projects matching the supplied I(project_key) filter.
    - This can be '*' which means all projects.
    required: true
    type: list

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

Outputs

messages:
  description: List of error messages.
  returned: always
  sample:
  - Repository `bar2` does not exist.
  type: list
projects:
  contains:
    description:
      description: Bitbucket project description.
      returned: success
      sample: This is a new Bitbucket project
      type: str
    id:
      description: Project ID.
      returned: success
      sample: 200
      type: int
    key:
      description: Bitbucket project key.
      returned: success
      sample: FOO
      type: str
    links:
      contains:
        self:
          description: Links to Bitbucket repository.
          elements: dict
          returned: success
          sample:
          - href: https://bitbucket.example.com/projects/FOO
          type: list
      description: Links to Bitbucket project.
      returned: success
      type: dict
    name:
      description: Bitbucket project name.
      returned: success
      sample: A new Bitbucket project
      type: str
    public:
      description: Whether or not the project is public.
      returned: success
      sample: false
      type: bool
    type:
      description: Bitbucket project type.
      returned: success
      sample: NORMAL
      type: str
  description: List of Bitbucket projects.
  returned: always
  type: list