Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation Warnings in task 'setup | start traefik container' #4

Open
frhei opened this issue Dec 20, 2020 · 0 comments
Open

Deprecation Warnings in task 'setup | start traefik container' #4

frhei opened this issue Dec 20, 2020 · 0 comments

Comments

@frhei
Copy link

frhei commented Dec 20, 2020

Running arillso.trafik role in environment

ansible --version
ansible 2.10.4
  config file = /home/xxx/stereotyped-ansible/ansible.cfg
  configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/xxx/.local/lib/python3.7/site-packages/ansible
  executable location = /home/xxx/.local/bin/ansible
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]

produces the following deprecations warnings in task 'setup | start traefik container':

TASK [arillso.traefik : setup | start traefik container] **************************************************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: The container_default_behavior option will change its default value from "compatibility" to "no_defaults" in community.general 3.0.0. To remove this warning, please specify an explicit value for it now. This feature will be removed from 
community.general in version 3.0.0. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Please note that the default value for `network_mode` will change from not specified (which is equal to `default`) to the name of the first network in `networks` if `networks` has at least one entry and `networks_cli_compatible` is `true`. You can 
change the behavior now by explicitly setting `network_mode` to the name of the first network in `networks`, and remove this warning by setting `network_mode` to `default`. Please make sure that the value you set to `network_mode` equals the inspection result for existing 
containers, otherwise the module will recreate them. You can find out the correct value by running "docker inspect --format '{{.HostConfig.NetworkMode}}' <container_name>". This feature will be removed from community.general in version 3.0.0. Deprecation warnings can be 
disabled by setting deprecation_warnings=False in ansible.cfg.

Suggested solution:
Insert following lines into the respective task definiton:

- name: setup | start traefik container
   ...
    network_mode: '{{ traefik_network_name }}'
    container_default_behavior: compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant