New in version 1.4.
Adds service hooks and removes service hooks that have an error status.
parameter | required | default | choices | comments |
---|---|---|---|---|
action | yes |
| This tells the githooks module what you want it to do. |
|
content_type | no | json |
| Content type to use for requests made to the webhook |
hookurl | no | 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. |
||
oauthkey | yes | The oauth key provided by github. It can be found/generated on github under "Edit Your Profile" >> "Applications" >> "Personal Access Tokens" |
||
repo | yes | 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. |
||
user | yes | Github username. |
||
validate_certs | no | yes |
| If no , SSL certificates for the target repo will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
# 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. - local_action: github_hooks action=cleanall user={{ gituser }} oauthkey={{ oauthkey }} repo={{ repo }}
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/github_hooks_module.html