[警告]:在:/usr/share/my_modules:/usr/lib/python2.7/site-packages/ansible/modules中未找到模块snow_记录

[警告]:在:/usr/share/my_modules:/usr/lib/python2.7/site-packages/ansible/modules中未找到模块snow_记录,ansible,Ansible,当我在剧本中使用snow_记录时,我得到以下错误。请帮忙 ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path. 您使用的是旧版本的ansible(2.4.2),其中不存在service now模块() 您需要升级到2.5才能获得snow\u记录模块 但是对于snow\u记录\u find您需要升级到2.9 从那时起,该模块就是serv

当我在剧本中使用snow_记录时,我得到以下错误。请帮忙

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

您使用的是旧版本的ansible(2.4.2),其中不存在service now模块()

您需要升级到2.5才能获得
snow\u记录
模块

但是对于
snow\u记录\u find
您需要升级到2.9

从那时起,该模块就是servicenow集合的一部分:

除了拥有正确版本的ansible以拥有该模块外,该特定模块还有一些要求():您需要在模块执行所针对的主机上安装python
pysnow
模块。
您可以通过使用service now模块之前的任务中的
pip
package
(如果pysnow是作为系统包提供的)模块来实现这一点。

现在我已将ansible升级到2.9。这一次是一个错误。ImportError:没有名为pysnow的模块。导入所需的Python库(pysnow)失败。我想知道是否要添加此信息:某些模块有需求(在模块文档中记录),在这种情况下,它是
pysnow
tasks:
- name: calling variable which has user/pass
  include_vars: /ansible/pass.yml

- name: read from snow
  snow_record_find:
     username: "{{ snow_username }}"
     password: "{{ snow_password }}"
     instance: mycompany
     state: present
     table: incident
     query:
       assignment_group: unix-support
     return_fields:
        - number
  register: host_list
# ansible-doc snow_record

[WARNING]: module snow_record not found in: /usr/share/my_modules:/usr/lib/python2.7/site-packages/ansible/modules

ansible 2.4.2.0
  config file = /home/m0156751/ansible/ansible.cfg
  configured module search path = [u'/usr/share/my_modules']
  ansible python module location - /usr/lib/python2.7/site-packages/ansible
  executable location - /usr/bin/ansible
  python version = 2.7.5 (default, Aug 13 2020, 02:51:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]