saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
573 stars 65 forks source link

allow for custom log driver and log options on container creation #68

Closed jolbol1 closed 2 years ago

jolbol1 commented 2 years ago

This adds the ability for a user to customise the log driver and log options using docker_log_driver and docker_log_options in group vars all.yml, as well as allowing it per container ROLE_docker_log_options and ROLE_docker_log_driver. If none of these are present it will omit, thus using defaults.

This is useful for promtail and loki.

saltydk commented 2 years ago

localhost.yml is where users will edit anything. Not all.yml as that will get overwritten.

jolbol1 commented 2 years ago

localhost.yml is where users will edit anything. Not all.yml as that will get overwritten.

But you can still put docker_log_driver in localhost correct?

Or is there another way to have a customisable global variable?

saltydk commented 2 years ago

Yes, that is how you do it. Was just letting you know since you seem to have misunderstood :)

saltydk commented 2 years ago

added something similar in https://github.com/saltyorg/Saltbox/commit/14001041558b8b891e3a324ca57c150ffd669f06