From 81a5aba0a2152196909baceef5e751addfedbf0c Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Thu, 23 Aug 2018 13:05:42 +0200 Subject: [PATCH] docker_container: allow arbitrary log_driver (#33579) Docker supports logging plugin (see https://docs.docker.com/engine/admin/logging/plugins) so it no longer makes sense to limit the log_driver option to a set of fixed choices. --- .../modules/cloud/docker/docker_container.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index b9d199ee32f..8b1d98fe32d 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -182,16 +182,9 @@ options: - Setting this will force container to be restarted. log_driver: description: - - Specify the logging driver. Docker uses json-file by default. - choices: - - none - - json-file - - syslog - - journald - - gelf - - fluentd - - awslogs - - splunk + - Specify the logging driver. Docker uses I(json-file) by default. + - See L(here,https://docs.docker.com/config/containers/logging/configure/) for possible choices. + required: false log_options: description: - Dictionary of options specific to the chosen log_driver. See https://docs.docker.com/engine/admin/logging/overview/ @@ -2102,9 +2095,7 @@ def main(): kill_signal=dict(type='str'), labels=dict(type='dict'), links=dict(type='list'), - log_driver=dict(type='str', - choices=['none', 'json-file', 'syslog', 'journald', 'gelf', 'fluentd', 'awslogs', 'splunk'], - default=None), + log_driver=dict(type='str'), log_options=dict(type='dict', aliases=['log_opt']), mac_address=dict(type='str'), memory=dict(type='str', default='0'),