]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
Merge pull request #10 from paulrbr-fl/fix-dhall-config-for-kong-upgrade v0.6
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>
Thu, 4 Apr 2019 11:40:09 +0000 (13:40 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2019 11:40:09 +0000 (13:40 +0200)
dhall(fix): fix for generated configuration for Kong 1.x upgrade

dhall/server/service/plugin/Config.dhall
dhall/server/service/plugin/mkRequestTransformer.dhall
meta/main.yml
tasks/plugins.yml

index 73a333f56a120aff6ddfa81f7040286f8d0edf27..d54436b065fe3edebd1875a4903f28f66d978c2d 100644 (file)
@@ -1,9 +1,9 @@
 < CorrelationId :
-    { header_name : Text, echo_downstream : Bool }
+       { header_name : Text, echo_downstream : Bool }
 | RequestTransformer :
-    { `add.headers` : Text }
+       { add : { headers : List Text } }
 | RequestTermination :
-    { status_code : Natural, content_type : Text, body : Text }
+       { status_code : Natural, content_type : Text, body : Text }
 | IPRestriction :
-    { whitelist : Text }
->
+       { whitelist : Text }
+>
\ No newline at end of file
index 90789c85aba54b16c640e2e2d5acd108a8a8da6f..1d8d608914a1fc74695c21abd0400bd9cdb28bf2 100644 (file)
@@ -1,11 +1,11 @@
-    let Plugin = ./Plugin.dhall
+let Plugin = ./Plugin.dhall
 
 in  let config = constructors ./Config.dhall
 
-in    λ(header : Text)
-    →   { name =
-            "request-transformer"
-        , config =
-            config.RequestTransformer { `add.headers` = header }
-        }
-      : Plugin
+       in    λ(header : Text)
+               →   { name =
+                               "request-transformer"
+                       , config =
+                               config.RequestTransformer { add = { headers = [ header ] } }
+                       }
+                 : Plugin
\ No newline at end of file
index a2ae9752362c96d195f03baea883030ce6685b5a..af8b3f087b960c145a255889f5d313e1317e964a 100644 (file)
@@ -32,7 +32,13 @@ galaxy_info:
   #
   # platforms is a list of platforms, and each platform has a name and a list of versions.
   #
-  # platforms:
+  platforms:
+    - name: Debian
+      versions:
+        - all
+    - name: Ubuntu
+      version:
+        - all
   # - name: Fedora
   #   versions:
   #   - all
index cedbbd2af2b089dcf0cc8457118b194ea4731aa0..c64e5c956307dcaece0cefa2cc35eecb9b66737b 100644 (file)
@@ -23,7 +23,7 @@
     current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}"
     current_id_hash:
       id: "{{ current_config.id }}"
-    current_body: "{{ (current_id_hash.id == '') | ternary({}, current_id_hash) }}"
-    exists_plugin: "{{ current_id_hash.id == '' }}"
+    current_body: "{{ not current_id_hash.id  | ternary({}, current_id_hash) }}"
+    exists_plugin: "{{ not current_id_hash.id  }}"
   when: not kong_app_service_plugins_check is skipped
   no_log: true