Using this as my template: https://github.com/modcloth/ansible-role-modcloth-sumologic-collector - It works great, but I'm looking for some suggestions on how to expand it for my intended needs. I need to create a JSON file based on multiple arrays.
Below is the default array that I need in the SumoLogic JSON source.
role / sumologic / defaults / main.yml:
sumologic_collector_default_log_path:
- { name: "Auth Log", path: "/var/log/auth.log", use_multiline: false, category: "OS/Linux/Auth" }
Let's say I want to add an additional file to the SumoLogic JSON file from group_vars / app_server.yml:
- { name: "Package Log", path: "/var/log/nginx/access.log", use_multiline: fasle, category: "OS/Linux/Nginx" }
How to combine the above examples using a template into the same destination file?
We are pleased to provide more detailed information. I'm not quite sure that my thought approach makes sense, although I think set_fact is one way to do this, and I could not figure it out enough to understand the way.
source share