Provider will run a simple query against a webhook. For example, you'd like to run a GET request on http://localhost:8080/this
:
http { 'this':
ensure => get,
port => '8080',
fqdn => 'localhost', # Do not place the http://, this currently done by the provider. Will update for https support soon.
}
This is nice if you have a webhook running somewhere to execute a certain command, and you'd like to hit that hook each time you run puppet on a specific node.
http { 'status':
ensure => post,
port => '1015',
fqdn => 'localhost',
data => {
'hostname' => $::fqdn,
'some_data_key' => '1.2.3',
'some_other_data' => 'ImImportant'
}
}
This module also provides a simple webhook erb template that sets up a listener:
include http
http::listener {'puppet':
port => '6969',
routes => {
'run_puppet' => {
'method' => 'get',
'command' => "su - peadmin -c 'mco puppet runonce'"
},
'test' => {
'method' => 'post',
'command' => 'echo fuckitshipit',
},
}
}
ssl_enable
cert_path
key_path
port
bind_address
rack_env
command
http_method
- https support for webhook provider
- more listener options:
- more than one route per webhook
- stricter security; github token verification
- put method for provider
- other shit I didn't do this sunday