http
This module uses wiccian magic to POST and GET shit from the interwebs
Version information
released Apr 2nd 2015
This version is compatible with:
- Puppet Enterprise >3.2.0 <4.0.0
- Puppet >3.0.0 <4.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'malnick-http', '0.1.3'
Learn more about managing modules with a PuppetfileDocumentation
malnick/http — version 0.1.3 Apr 2nd 2015
puppet-http
HTTP Provider
Provider will run a simple query against a webhook. For example, you'd like to run a GET request on http://localhost:8080/this
:
GET
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.
Or POST - All data is mutated to JSON
http { 'status':
ensure => post,
port => '1015',
fqdn => 'localhost',
data => {
'hostname' => $::fqdn,
'some_data_key' => '1.2.3',
'some_other_data' => 'ImImportant'
}
}
Listener Defined Type
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' => 'get',
'command' => 'echo fuckitshipit',
},
}
}
Listener Defined Type Parameters
ssl_enable
cert_path
key_path
port
bind_address
rack_env
command
http_method
Big fucking todo list
- 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
Types in this module release
Dependencies
- puppetlabs/pe_gem (>= 0.1.0 <1.0.0)
- puppetlabs/stdlib (>= 4.5.0 <5.0.0)