小编Bar*_*art的帖子

Ansible 错误:AttributeError:模块“平台”没有属性“dist”

我想通过 ansible playbook 在远程计算机中添加组,但出现错误。

这是我的剧本中的代码:

- name: Ensure group for deploy_user exists
  become: yes
  group:
    name: "{{ deploy_user }}"
    state: present
Run Code Online (Sandbox Code Playgroud)

这是我得到的错误:

fatal: [webserver]: FAILED! => {
"changed": false,
"module_stderr": "mux_client_request_session: read from master failed: Broken pipe\r\nShared connection to server closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_46blg1ge/ansible_modlib.zip/ansible/module_utils/basic.py\", line 274, in get_distribution\r\nAttributeError: module 'platform' has no attribute '_supported_dists'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_46blg1ge/ansible_module_group.py\", line 478, in <module>\r\n    main()\r\n  File \"/tmp/ansible_46blg1ge/ansible_module_group.py\", …
Run Code Online (Sandbox Code Playgroud)

python deployment ansible

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

ansible ×1

deployment ×1

python ×1