ansible / ansible.builtin / v2.9.27 / module / _github_hooks
Removed in 2.12
Reason:Replaced by more granular modules | Alternative:Use M(github_webhook) and M(github_webhook_info) instead.
Manages GitHub service hooks.
| "added in version" 1.4 of ansible.builtin"
Authors: Phillip Gentry, CX Inc (@pcgentry)
deprecated | supported by community
pip
Install with pip install ansible==2.9.27
Adds service hooks and removes service hooks that have an error status.
# Example creating a new service hook. It ignores duplicates. - github_hooks: action: create hookurl: http://11.111.111.111:2222 user: '{{ gituser }}' oauthkey: '{{ oauthkey }}' repo: https://api.github.com/repos/pcgentry/Github-Auto-Deploy
# Cleaning all hooks for this repo that had an error on the last update. Since this works for all hooks in a repo it is probably best that this would # be called from a handler. - github_hooks: action: cleanall user: '{{ gituser }}' oauthkey: '{{ oauthkey }}' repo: '{{ repo }}' delegate_to: localhost
repo: description: - 'This is the API url for the repository you want to manage hooks for. It should be in the form of: https://api.github.com/repos/user:/repo:. Note this is different than the normal repo url. ' required: true user: description: - GitHub username. required: true action: choices: - create - cleanall - list - clean504 description: - This tells the githooks module what you want it to do. required: true hookurl: description: - When creating a new hook, this is the url that you want GitHub to post to. It is only required when creating a new hook. required: false oauthkey: description: - The oauth key provided by GitHub. It can be found/generated on GitHub under "Edit Your Profile" >> "Developer settings" >> "Personal Access Tokens" required: true content_type: choices: - json - form default: json description: - Content type to use for requests made to the webhook required: false validate_certs: default: 'yes' description: - If C(no), SSL certificates for the target repo will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false type: bool