Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.github_webhook_info
.
github_webhook_facts
before Ansible 2.9. The usage did not change.The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
github_url string | Default: "https://api.github.com" | Base URL of the github api |
password string | Password to authenticate to GitHub with | |
repository string / required | Full name of the repository to configure a hook for aliases: repo | |
token string | Token to authenticate to GitHub with | |
user string / required | User to authenticate to GitHub as |
- name: List hooks for a repository (password auth) community.general.github_webhook_info: repository: ansible/ansible user: "{{ github_user }}" password: "{{ github_password }}" register: ansible_webhooks - name: List hooks for a repository on GitHub Enterprise (token auth) community.general.github_webhook_info: repository: myorg/myrepo user: "{{ github_user }}" token: "{{ github_user_api_token }}" github_url: https://github.example.com/api/v3/ register: myrepo_webhooks
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
hooks list / elements=string | always | A list of hooks that exist for the repo Sample: [{"has_shared_secret": true, "url": "https://jenkins.example.com/ghprbhook/", "events": ["issue_comment", "pull_request"], "insecure_ssl": "1", "content_type": "json", "active": true, "id": 6206, "last_response": {"status": "active", "message": "OK", "code": 200}}] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/github_webhook_info_module.html