Created
June 24, 2015 07:48
-
-
Save toast38coza/6a5e4a452106426ac20e to your computer and use it in GitHub Desktop.
Creating github service webhooks with Ansible uri_module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "jenkins", | |
| "active": true, | |
| "events": [ | |
| "push" | |
| ], | |
| "config": { | |
| "jenkins_hook_url": "http://ci.jenkins-ci.org/github-webhook/" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Jenkins webhook | |
| uri: | |
| url: https://api.github.com/repos/{{github_repo}}/hooks | |
| method: POST | |
| user: ... | |
| password: ... | |
| body: "{{ lookup('file','files/github/jenkins-webhook.json') }}" | |
| force_basic_auth: yes | |
| status_code: 200,201 | |
| body_format: json | |
| tags: | |
| - jenkins | |
| - webhooks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment