]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/blobdiff - README.md
Merge pull request #16 from paulrbr-fl/add-default-correlation-id
[github/fretlink/ansible-kong-app.git] / README.md
index 074e830e9a890dff39e2fba4a4c1905c309ac542..8db9391ee1bc4e176be41a4ea6a29c8b3417d8f7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,20 +10,27 @@ None at the moment
 
 Role Variables
 --------------
-
-* `kong_app_admin_url` the kong admin url (mandatory).
-* `kong_app_admin_apikey` the apikey to use kong admin api. Default to ""
-* `kong_services` an array of services to setup (default to [])
-  * `name` the name of the service to create for this app, mandatory
-  * `url` the url of the backend of the app, mandatory
-  * `plugins` An array of plugins to activate with their name and config in a dict
-    * `name`
-    * `config`
-  * `routes` An array of routes to create for this service.
-    * `hosts`
-    * `paths`
-    * `protocols`
-    * `methods`
+* `kong_servers`: an array of kong\_server to configure with followin configuration:
+  * `kong_app_admin_url` the kong admin url (mandatory).
+  * `kong_app_admin_apikey` the apikey to use kong admin api. Default to ""
+  * `services` an array of services to setup (default to [])
+    * `name` the name of the service to create for this app, mandatory
+    * `url` the url of the backend of the app, mandatory. May refer to an upstream by its name (https://upstream\_name/path)
+    * `upstream` if the url reference an upstream a dict with the configuration, optional
+      * `conf` the configuration as expected by kong for an upstream creation
+        * `name` mandatory name for the upstream
+        * `healthchecks` optional healthchecks configuration as expected by kong api
+      * `targets` an array of dict defining a target for kong
+        * `target` the host:port to reach the target (mandatory)
+        * `weight` the weight of the target (optional)
+    * `plugins` An array of plugins to activate with their name and config in a dict
+      * `name`
+      * `config`
+    * `routes` An array of routes to create for this service.
+      * `hosts`
+      * `paths`
+      * `protocols`
+      * `methods`
 
 Dependencies
 ------------
@@ -35,11 +42,11 @@ Example Playbook
 
     - hosts: localhost
       roles:
-         - { role: kong-app, kong_app_admin_url: http://localhost:8001,
-             kong_app_services: [ name:example,
+         - { role: kong-app, kong_servers: [ kong_app_admin_url: http://localhost:8001,
+             services: [ name:example,
              url: http://example.com,
              plugins: [],
-             routes: [ { hosts: [my.kong.example], paths: [/] } ]]
+             routes: [ { hosts: [my.kong.example], paths: [/] } ]]]
            }
 
 License