mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-21 08:29:08 -07:00
docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings. * Add changelog. * Improve message. * Improve formatting and formulation of other messages. * Add test for warning. * Trying double escaping.
This commit is contained in:
parent
6ff4547489
commit
d64b17731d
3 changed files with 19 additions and 6 deletions
|
@ -2125,6 +2125,7 @@
|
|||
log_options:
|
||||
labels: production_status
|
||||
env: os,customer
|
||||
max-file: 5
|
||||
register: log_options_1
|
||||
|
||||
- name: log_options (idempotency)
|
||||
|
@ -2137,6 +2138,7 @@
|
|||
log_options:
|
||||
env: os,customer
|
||||
labels: production_status
|
||||
max-file: 5
|
||||
register: log_options_2
|
||||
|
||||
- name: log_options (less log options)
|
||||
|
@ -2159,7 +2161,7 @@
|
|||
log_driver: json-file
|
||||
log_options:
|
||||
labels: production_status
|
||||
max-file: 1
|
||||
max-size: 10m
|
||||
force_kill: yes
|
||||
register: log_options_4
|
||||
|
||||
|
@ -2174,6 +2176,8 @@
|
|||
that:
|
||||
- log_options_1 is changed
|
||||
- log_options_2 is not changed
|
||||
- "'Non-string value found for log_options option \\'max-file\\'. The value is automatically converted to \\'5\\'. If this is not correct, or you want to
|
||||
avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
- log_options_3 is not changed
|
||||
- log_options_4 is changed
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue