You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2020/11/13 17:38:56 UTC

[trafficcontrol] 03/06: Adding plugin config fields to ansible cdn.conf file (#5272)

This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch 5.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 2a32ec6194d659f5b52d1f9d2ef93c3206b19ff9
Author: Srijeet Chatterjee <30...@users.noreply.github.com>
AuthorDate: Wed Nov 11 13:42:59 2020 -0700

    Adding plugin config fields to ansible cdn.conf file (#5272)
    
    Adding missing optional Golang Plugin configuration options from Ansible deployment automation
    
    (cherry picked from commit 04a55056c9dc7c53e90b7f31cf531c5805c72d49)
---
 infrastructure/ansible/roles/traffic_ops/defaults/main.yml     | 2 ++
 infrastructure/ansible/roles/traffic_ops/templates/cdn.conf.j2 | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/infrastructure/ansible/roles/traffic_ops/defaults/main.yml b/infrastructure/ansible/roles/traffic_ops/defaults/main.yml
index 1d84be2..266af1f 100644
--- a/infrastructure/ansible/roles/traffic_ops/defaults/main.yml
+++ b/infrastructure/ansible/roles/traffic_ops/defaults/main.yml
@@ -110,6 +110,8 @@ to_go_supported_ds_metrics:
   - tps_4xx
   - tps_5xx
 
+to_plugin_config: {}
+
 to_smtp_enabled: false
 to_smtp_username: ""
 to_smtp_password: ""
diff --git a/infrastructure/ansible/roles/traffic_ops/templates/cdn.conf.j2 b/infrastructure/ansible/roles/traffic_ops/templates/cdn.conf.j2
index 7fd3c02..dee4ca4 100644
--- a/infrastructure/ansible/roles/traffic_ops/templates/cdn.conf.j2
+++ b/infrastructure/ansible/roles/traffic_ops/templates/cdn.conf.j2
@@ -75,6 +75,8 @@
       "read_header_timeout" : {{ to_go_read_header_timeout }},
       "read_timeout" : {{ to_go_read_timeout }},
       "write_timeout" : {{ to_go_write_timeout }},
-      "supported_ds_metrics" : {{ to_go_supported_ds_metrics | to_json }}
+      "supported_ds_metrics" : {{ to_go_supported_ds_metrics | to_json }},
+      "plugins": {{ to_plugin_config.keys() | list | to_json }},
+      "plugin_config" : {{ to_plugin_config | to_nice_json(indent=2) }}
    }
 }