首页 > 解决方案 > Ansible 给出“ansible.utils.display.initialize_locale 尚未被调用”警告

问题描述

我收到此警告ansible.utils.display.initialize_locale has not been called,但找不到修复它的文档。

[WARNING]: ansible.utils.display.initialize_locale has not been called, this may result in incorrectly calculated text widths that can cause Display to print incorrect line lengths

剧本:

- name: Create Docker Swarm Cluster
  hosts: localhost
  connection: local

  vars:
    # Project name to used as part of resource names
    project_name: swarm

    # The location of the Azure resources
    location: eastus

运行它:

ansible-playbook provision.yml

用于python3 -m venv env设置环境。

和 ansible 版本:

$ ansible --version
ansible [core 2.11.1] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/pomatti/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/pomatti/projects/personal/docker-swarm-cluster-with-ansible/env/lib/python3.8/site-packages/ansible
  ansible collection location = /home/pomatti/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/pomatti/projects/personal/docker-swarm-cluster-with-ansible/env/bin/ansible
  python version = 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0]
  jinja version = 3.0.1
  libyaml = True

标签: ansible

解决方案


推荐阅读