我的 Ansible 剧本中有一个 Ansible Collections,如下所示:
- name: Create a profile for the user
community.windows.win_user_profile:
username: test
name: test
state: present
该集合是通过安装的
ansible-galaxy collection install ansible.windows
所以我可以在 ~/.ansible/collections 中看到它。
然而我不断得到:
ERROR! couldn't resolve module/action 'community.windows.win_user_profile'. This often indicates a misspelling, missing collection, or incorrect module path.
我还将它与剧本一起复制,以防万一,但仍然收到相同的错误消息。
有什么建议么?
安装后,我在 Ubuntu 20.04 上使用 Ansible 2.9 时遇到了同样的错误community.general
。这种情况下的解决方案是安装ansible.posix
ansible-galaxy collection install ansible.posix
因为这包含mount
module https://docs.ansible.com/ansible/latest/collections/ansible/posix/mount_module.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)