community.general.heroku_collaborator (8.5.0) — module

Add or delete app collaborators on Heroku

Authors: Marcel Arns (@marns93)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manages collaborators for Heroku apps.

If set to V(present) and heroku user is already collaborator, then do nothing.

If set to V(present) and heroku user is not collaborator, then add user to app.

If set to V(absent) and heroku user is collaborator, then delete user from app.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a heroku collaborator
  community.general.heroku_collaborator:
    api_key: YOUR_API_KEY
    user: max.mustermann@example.com
    apps: heroku-example-app
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: An example of using the module in loop
  community.general.heroku_collaborator:
    api_key: YOUR_API_KEY
    user: '{{ item.user }}'
    apps: '{{ item.apps | default(apps) }}'
    suppress_invitation: '{{ item.suppress_invitation | default(suppress_invitation) }}'
    state: '{{ item.state | default("present") }}'
  with_items:
    - { user: 'a.b@example.com' }
    - { state: 'absent', user: 'b.c@example.com', suppress_invitation: false }
    - { user: 'x.y@example.com', apps: ["heroku-example-app"] }

Inputs

    
apps:
    description:
    - List of Heroku App names
    elements: str
    required: true
    type: list

user:
    description:
    - User ID or e-mail
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Create or remove the heroku collaborator
    type: str

api_key:
    description:
    - Heroku API key
    type: str

suppress_invitation:
    default: false
    description:
    - Suppress email invitation when creating collaborator
    type: bool