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.
This commit is contained in:
Vincent Rischmann 2018-08-23 13:05:42 +02:00 committed by ansibot
parent 7a4ed53d08
commit 81a5aba0a2

View file

@ -182,16 +182,9 @@ options:
- Setting this will force container to be restarted. - Setting this will force container to be restarted.
log_driver: log_driver:
description: description:
- Specify the logging driver. Docker uses json-file by default. - Specify the logging driver. Docker uses I(json-file) by default.
choices: - See L(here,https://docs.docker.com/config/containers/logging/configure/) for possible choices.
- none required: false
- json-file
- syslog
- journald
- gelf
- fluentd
- awslogs
- splunk
log_options: log_options:
description: description:
- Dictionary of options specific to the chosen log_driver. See https://docs.docker.com/engine/admin/logging/overview/ - 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'), kill_signal=dict(type='str'),
labels=dict(type='dict'), labels=dict(type='dict'),
links=dict(type='list'), links=dict(type='list'),
log_driver=dict(type='str', log_driver=dict(type='str'),
choices=['none', 'json-file', 'syslog', 'journald', 'gelf', 'fluentd', 'awslogs', 'splunk'],
default=None),
log_options=dict(type='dict', aliases=['log_opt']), log_options=dict(type='dict', aliases=['log_opt']),
mac_address=dict(type='str'), mac_address=dict(type='str'),
memory=dict(type='str', default='0'), memory=dict(type='str', default='0'),