github_release - Interact with GitHub Releases
New in version 2.2.
Synopsis
- Fetch metadata about GitHub Releases
Requirements (on host that executes module)
- github3.py >= 1.0.0a3
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
action | yes |
| Action to perform | |
body (added in 2.4)
| no | Description of the release when creating a release | ||
draft (added in 2.4)
| no |
| Sets if the release is a draft or not. (boolean) | |
name (added in 2.4)
| no | Name of release when creating a release | ||
password (added in 2.4)
| no | The GitHub account password for the user | ||
prerelease (added in 2.4)
| no |
| Sets if the release is a prerelease or not. (boolean) | |
repo | yes | Repository name | ||
tag (added in 2.4)
| no | Tag name when creating a release. Required when using action is set to create_release . | ||
target (added in 2.4)
| no | Target of release when creating a release | ||
token | no | GitHub Personal Access Token for authenticating | ||
user | yes | The GitHub account that owns the repository |
Examples
- name: Get latest release of testuseer/testrepo github_release: token: tokenabc1234567890 user: testuser repo: testrepo action: latest_release - name: Get latest release of test repo using username and password. Ansible 2.4. github_release: user: testuser password: secret123 repo: testrepo action: latest_release - name: Create a new release github_release: token: tokenabc1234567890 user: testuser repo: testrepo action: create_release tag: test target: master name: My Release body: Some description
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
latest_release | Version of the latest release | success | string | 1.1.0 |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/github_release_module.html