ansible.builtin.heroku_collaborator (v2.9.27) — module

Add or delete app collaborators on Heroku

| "added in version" 2.6 of ansible.builtin"

Authors: Marcel Arns (@marns93)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages collaborators for Heroku apps.

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

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

If set to C(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.
- 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.
- 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
    required: true

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

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

api_key:
    description:
    - Heroku API key

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