Я хочу добавить группу на удаленном компьютере через ansible playbook, и я получаю ошибку.
Это мой код из playbook:
- name: Ensure group for deploy_user exists
become: yes
group:
name: "{{ deploy_user }}"
state: present
, и это ошибка, которую я получаю :
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\", line 426, in main\r\n group = Group(module)\r\n File \"/tmp/ansible_46blg1ge/ansible_module_group.py\", line 80, in __new__\r\n return load_platform_subclass(Group, args, kwargs)\r\n File \"/tmp/ansible_46blg1ge/ansible_modlib.zip/ansible/module_utils/basic.py\", line 332, in load_platform_subclass\r\n File \"/tmp/ansible_46blg1ge/ansible_modlib.zip/ansible/module_utils/basic.py\", line 284, in get_distribution\r\nAttributeError: module 'platform' has no attribute 'dist'\r\n",
"msg": "MODULE FAILURE",
"rc": 1
}
Мой ansible работает на WSL:
ansible 2.5.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/rideto/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0]
Пожалуйста, помогите.