From 1839f8b03eef0b29168db3b5d1d5d08d325c933c Mon Sep 17 00:00:00 2001 From: Mike Baynton Date: Tue, 17 Apr 2018 10:30:58 -0500 Subject: [PATCH] Update README for API change --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7ca76ad..52d0c0e 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ This example call to the service using `curl` will cause the puppet master to si configuration file called "environment" to be run as well. It will also submit some HTTP authentication credentials using the digest method. ```bash -$ curl http://puppet.my.org:8240/provision -d hostname=newnode.my.org -d tasks=cert,environment \ +$ curl http://puppet.my.org:8240/provision -d hostname=newnode.my.org -d tasks=cert-sign,environment \ --digest --user provision-user:SomeSuperSecretPassword ``` ## Requirements -The service is a statically-linked binary, so external dependencies / environmental requirements are minimal. +The service is pretty much a statically-linked binary, so external dependencies / environmental requirements are minimal. That said, * Testing is occurring only on Linux. YMMV on Windows; feel free to provide feedback if you use this software in a Windows environment. @@ -58,7 +58,7 @@ and `go install` it. ## Starting and Stopping The process can typically be started simply by executing it with no arguments. It should be run as the same user that runs your puppet master server, user `puppet` on standard installations. -It does not daemonize, so write initscripts accordingly. +It does not daemonize, so write initscripts / systemd services accordingly. The process should shut down cleanly in response to SIGTERMs. @@ -70,16 +70,15 @@ The process should shut down cleanly in response to SIGTERMs. - - - + +
FieldRequired?ExampleDescription
hostnamerequiredfoo.bar.comThe name of the host to be provisioned, as it will identify itself to puppet.
tasksrequiredcert,environmentComma-separated list of provisioning operations to perform. Valid operations are the `Name`s defined in the `GenericExecTasks` configuration section, plus the special built-in task name `cert` to cause client certificate signing.
waitsoptionalenvironmentComma-separated list of provisioning operations to wait for before the response is sent back. If you need to know the outcome of a provisioning operation, add it to this list and its results will be included in the response.
cert-revokeoptionaltrueIf set, any existing certificates for the same hostname will be revoked to enable successful signing of a new CSR for this hostname.
tasksrequiredcert-sign,cert-revoke,environmentComma-separated list of provisioning operations to perform. Valid operations are the `Name`s defined in the `GenericExecTasks` configuration section, plus these special built-in task names:
  • `cert-sign`: causes client certificate to be signed.
  • `cert-revoke`: causes any existing client certificate for same hostname to be revoked.
waitsoptionalcert-revoke,environmentComma-separated list of provisioning operations to wait for before the response is sent back. If you need to know the outcome of a provisioning operation, add it to this list and its results will be included in the response.
-Requested tasks are assumed to be independent of each other and are run concurrently. If you need -tasks to be run in a particular order, call the API multiple times with `waits` on the earlier tasks. +If you configure `GenericExecTasks`, you may also POST other fields and use them in the invocation template as a means +to pass data to your task. #### Response -**Content-Type: application/json** +**Content-Type: application/json** A json object containing a key matching each of the tasks requested. The value of each task key is an object with the following values: