community.general.heroku_collaborator – Add or delete app collaborators on Heroku
Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.heroku_collaborator
.
Synopsis
- Manages collaborators for Heroku apps.
- If set to
present
and heroku user is already collaborator, then do nothing. - If set to
present
and heroku user is not collaborator, then add user to app. - If set to
absent
and heroku user is collaborator, then delete user from app.
Requirements
The below requirements are needed on the host that executes this module.
- heroku3
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
api_key string | Heroku API key | |
apps list / elements=string / required | List of Heroku App names | |
state string |
| Create or remove the heroku collaborator |
suppress_invitation boolean |
| Suppress email invitation when creating collaborator |
user string / required | User ID or e-mail |
Notes
Note
-
HEROKU_API_KEY
andTF_VAR_HEROKU_API_KEY
env variable can be used instead settingapi_key
. - If you use –check, you can also pass the -v flag to see affected apps in
msg
, e.g. [“heroku-example-app”].
Examples
- name: Create a heroku collaborator community.general.heroku_collaborator: api_key: YOUR_API_KEY user: [email protected] apps: heroku-example-app state: present - 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: '[email protected]' } - { state: 'absent', user: '[email protected]', suppress_invitation: false } - { user: '[email protected]', apps: ["heroku-example-app"] }
Authors
- Marcel Arns (@marns93)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/heroku_collaborator_module.html