puppetlabs / puppetlabs-http_request Goto Github PK
View Code? Open in Web Editor NEWA task for making HTTP requests.
License: Apache License 2.0
A task for making HTTP requests.
License: Apache License 2.0
Hello,
I am evaluating this module to use it for REST API based management of various devices including the Datapower appliance and would like to have the ability to pass basic authentication credentials for the same, please let me know how a basic auth credential can be passed using the http_request module?
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
The http_request
task should be able to automatically convert a request body to JSON, set the Content-Type
header to application/json
, and parse the response body as JSON.
Create a json_endpoint
parameter that will do the above.
Hello,
I am able to connect now to HTTP end points but when I try making a HTTPS connection is when I encounter issues, the following is the typical issue I encounter although I provide it the path to the certificate, can you tell me if you have a solution for this problem, the following is the output I see when I make a TLS connection,
PS C:\WINDOWS\system32> Invoke-BoltTask -Name 'http_request' -Targets 'localhost' base_url=https://esbn12dp:8840/dev1/ json_endpoint=true cacert='C:\git-repo\puppet\certs\BSCROOTCA2.cer' cert='C:\git-repo\puppet\certs\BSCISSUECA2.cer' method=get --log-level debug
Bolt collects data about how you use it. You can opt out of providing this data.
To learn how to disable data collection, or see what data Bolt collects and why,
see http://pup.pt/bolt-analytics
[ID: analytics_opt_out]
Could not write analytics configuration to H:/.puppetlabs/etc/bolt/analytics.yaml. [ID: unwriteable_file]
Failed to initialize analytics client, analytics will be disabled: No such file or directory @ dir_s_mkdir - H:/.puppetlabs
Did not detect Boltdir or bolt-project.yaml at 'C:/WINDOWS/system32'. This directory won't be loaded as a project.
Did not detect Boltdir or bolt-project.yaml at 'C:/WINDOWS'. This directory won't be loaded as a project.
Could not create default project at H:/.puppetlabs/bolt. Continuing without a writeable project. Log and rerun files will not be written. [ID: non_writeable_project]
Loading modules from C:/Program Files/Puppet Labs/Bolt/lib/ruby/gems/2.7.0/gems/bolt-3.15.0/bolt-modules;H:/.puppetlabs/bolt/modules;H:/.puppetlabs/bolt/.modules;C:/Program Files/Puppet Labs/Bolt/lib/ruby/gems/2.7.0/gems/bolt-3.15.0/modules
Tried to load inventory from H:/.puppetlabs/bolt/inventory.yaml, but the file does not exist
Did not find config for localhost in inventory
Started with 100 max thread(s)
Starting: task http_request on localhost
Running task http_request with '{"follow_redirects":true,"json_endpoint":true,"max_redirects":20,"method":"get","base_url":"https://esbn12dp:8840/dev1/","cacert":"C:\\git-repo\\puppet\\certs\\BSCROOTCA2.cer","cert":"C:\\git-repo\\puppet\\certs\\BSCISSUECA2.cer","_task":"http_request"}' on ["localhost"]
Running task 'http_request' on localhost
{"target":"localhost","action":"task","object":"http_request","status":"failure","value":{"_error":{"kind":"http_request/connect-error","msg":"Failed to connect to https://esbn12dp:8840/dev1/: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)","details":{}}}}
Finished: task http_request with 1 failure in 1.64 sec
Started on localhost...
Failed on localhost:
Failed to connect to https://esbn12dp:8840/dev1/: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
Failed on 1 target: localhost
Ran on 1 target in 1.75 sec
PS C:\WINDOWS\system32>
A clear and concise description of what you expected to happen.
Steps to reproduce the behavior:
Add any other context about the problem here.
The method parameter enum doesn't include patch
, so it is impossible to PATCH resources.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.