curl -f -k -H 'Content-Type: application/json' -XPOST -d '{"host_config_key": "xxxxx", "extra_vars": "{\"logs\":{{ eck_logs }},\"env_stage\":\"dev\"}"}' "https://tower.xxxx.net:443/api/v1/job_templates/xx/callback/"
"curl -f -k -H 'Content-Type: application/json' -XPOST -d '{\"host_config_key\": \"xxx\", \"extra_vars\": \"{\\\"logs\\\":\\\"[{u'file': u'/apps/app1/shared/logs/catalina.out', u'group_name': u'/on-premise/app1/container'}, {u'file': u'/apps/app1/shared/logs/app1-webapp.log', u'group_name': u'/on-premise/app1-webapp/applog'}]\\\",\\\"env_stage\\\":\\\"dev\\\"}\"}' \"https://tower.xxx.net:443/api/v1/job_templates/xx/callback/\""..
"eck_logs": [ { "file": "/apps/app1/shared/logs/catalina.out", "group_name": "/on-premise/app1/container" }, { "file": "/apps/app1/shared/logs/app1-webapp.log", "group_name": "/on-premise/app1/applog" } ]
logs: - ugroup_name: u/on-premise/app1-webapp/container ufile: u/apps/app1/shared/logs/catalina.out - ugroup_name: u/on-premise/app1/applog ufile: u/apps/app1/shared/logs/app1-webapp.log
curl -f -k -H 'Content-Type: application/json' -XPOST -d '{"host_config_key": "xxx", "extra_vars": "{\"logs\":\"{{ eck_logs }}\",\"env_stage\":\"dev\"}"}' "https://tower.xxx.net:443/api/v1/job_templates/xxx/callback/"
"curl -f -k -H 'Content-Type: application/json' -XPOST -d '{\"host_config_key\": \"xxx\", \"extra_vars\": \"{\\\"logs\\\":\\\"[{u'file': u'/apps/app1/shared/logs/catalina.out', u'group_name': u'/on-premise/app1/container'}, {u'file': u'/apps/app1/shared/logs/app1-we
bapp.log', u'group_name': u'/on-premise/app1-webapp/applog'}]\\\",\\\"env_stage\\\":\\\"dev\\\"}\"}' \"https://tower.xxx.net:443/api/v1/job_templates/xxx/callback/\""logs: >- [{ufile: u/apps/app1/shared/logs/catalina.out, ugroup_name: u/on-premise/app1/container}, {ufile: u/apps/app1/shared/logs/app1-webapp.log, ugroup_name: u/on-premise/app1/applog}]
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0ab058e1-63f5-4079-8037-941ba407971b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
curl -f -k -H 'Content-Type: application/json' -XPOST -d '{"host_config_key": "xxx", "extra_vars": "{\"logs\":\"{{ eck_logs | to_json }}\",\"env_stage\":\"dev\"}"}' "https://tower.xxx:443/api/v1/job_templates/xxx/callback/"
curl -f -k -H 'Content-Type: application/json' -XPOST -d '{\"host_config_key\": \"xxx\", \"extra_vars\": \"{\\\"logs\\\":\\\"[{\"file\": \"/apps/app1/shared/logs/catalina.out\", \"group_name\": \"/on-premise/app1/container\"}, {\"file\": \"/apps/app1/shared/logs/app1.log\", \"group_name\": \"/on-premise/app1-webapp/applog\"}]\\\",\\\"env_stage\\\":\\\"dev\\\"}\"}' \"https://tower.xxx.net:443/api/v1/job_templates/xxx/callback/\"
curl: (22) The requested URL returned error: 400 BAD REQUEST
curl -f -k -H 'Content-Type: application/json' -XPOST -d '{\"host_config_key\": \"xxx\", \"extra_vars\": \"{\\\"logs\\\":[{\"file\": \"/apps/app1/shared/logs/catalina.out\", \"group_name\": \"/on-premise/app1/container\"}, {\"file\": \"/apps/app1/shared/logs/app1.log\", \"group_name\": \"/on-premise/app1/applog\"}],\\\"env_stage\\\":\\\"dev\\\"}\"}' \"https://tower.xxx.net:443/api/v1/job_templates/xx/callback/\"
\\\"[{'file': '/apps/app1/shared/logs/catalina.out', 'group_name': '/on-premise/app1/container'}, {'file': '/apps/app1/shared/logs/app1-webapp.log', 'group_name': '/on-premise/app1-webapp/applog'}]\\\"
curl -f -k -H 'Content-Type: application/json' -XPOST -d '{"host_config_key": "xxx", "extra_vars": "{\"logs\":[{file: /apps/app1/shared/logs/catalina.out, group_name: /on-premise/app1/container}, {file: /apps/app1/shared/logs/app1.log, group_name: /on-premise/app1/webapp/applog}],\"env_stage\":\"dev\"}"}' "https://tower.xxx.net:443/api/v1/job_templates/xxx/callback/"
env_stage: devlogs: - file: /apps/app1/shared/logs/catalina.out group_name: /on-premise/app1/container - file: /apps/app1/shared/logs/app1.log group_name: /on-premise/app1/webapp/applog
- block: - name: Create fact for log info to format for callback set_fact: logs: "{{ eck_logs | to_json | replace('\"', '') }}" - name: Perform callback to tower to configure ECK logging command: > curl -f -k -H 'Content-Type: application/json' -XPOST -d '{"host_config_key": "xxx", "extra_vars": "{\"logs\":{{ logs }},\"env_stage\":\"dev\"}"}' "https://tower.xxx.net:443/api/v1/job_templates/xx/callback/" when: eck_logs is defined