diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2019-04-04 11:04:22 +0200 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2019-04-04 11:04:22 +0200 |
commit | c4e45883ca7a19878a6b3cc0a7ec25acf744a85e (patch) | |
tree | f5e2c9661f96f865a68b2f104d766479eaf39ca3 | |
parent | f24caef55d12e89742500b2c657b7e7fb33fd5f6 (diff) | |
download | ansible-kong-app-debug_upgrade.tar.gz ansible-kong-app-debug_upgrade.tar.zst ansible-kong-app-debug_upgrade.zip |
debug3debug_upgrade
-rw-r--r-- | tasks/plugins.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tasks/plugins.yml b/tasks/plugins.yml index e0eee81..1718864 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml | |||
@@ -24,6 +24,19 @@ | |||
24 | loop_control: | 24 | loop_control: |
25 | loop_var: plugin | 25 | loop_var: plugin |
26 | 26 | ||
27 | - name: debug3 | ||
28 | debug: | ||
29 | msg: "{{ plugin | combine(current_body) | to_json }}" | ||
30 | vars: | ||
31 | current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}" | ||
32 | current_id_hash: | ||
33 | id: "{{ current_config.id }}" | ||
34 | current_body: "{{ (current_id_hash.id == '') | ternary({}, current_id_hash) }}" | ||
35 | exists_plugin: "{{ current_id_hash.id == '' }}" | ||
36 | with_items: "{{ service.plugins | default([]) }}" | ||
37 | loop_control: | ||
38 | loop_var: plugin | ||
39 | |||
27 | - name: Setup plugin | 40 | - name: Setup plugin |
28 | uri: | 41 | uri: |
29 | url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" | 42 | url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" |