ansible galaxy角色';s命令/模块名称与内置runit模块冲突

ansible galaxy角色';s命令/模块名称与内置runit模块冲突,ansible,Ansible,我正在尝试使用ansible galaxy()角色来帮助runit服务监视器 根据他们的自述,我将此作为我的任务: - name: runit gunicorn #this command/module(? not sure about term) is provided by gotansible.runit runit: command: "gunicorn websec.wsgi -c /etc/gunicorn/gunicorn.conf" state: up

我正在尝试使用ansible galaxy()角色来帮助
runit
服务监视器

根据他们的自述,我将此作为我的任务:

- name: runit gunicorn
  #this command/module(? not sure about term) is provided by gotansible.runit
  runit:
    command: "gunicorn websec.wsgi -c /etc/gunicorn/gunicorn.conf"
    state: up
  tags:
    - failing
但当我运行剧本时,我得到:

 FAILED! => {"changed": false, 
 "msg": "Unsupported parameters for (runit) module: command 
 Supported parameters include: dist, enabled, name, service_dir, service_src, state"}
当您查看内置的runit模块支持时,这是有意义的

有没有办法将ansible指向
gotansible.runit
的模块,而不是ansible的内置模块

都不是

- name: runit gunicorn
  gotansible.runit:

似乎帮助很大


这只是一些快速的实验,我可能会避免使用这个角色,因为它看起来并不是最近才维护的。但我很好奇名字冲突是如何处理的。例如,他们说他们重命名了一些模块以避免名称冲突。

角色必须以这种方式调用

hosts: server
roles:
  - { role: gotansible.runit }
如网站首页所述

如果需要将参数传递给角色,可以这样做

hosts: server
roles:
  - { role: gotansible.runit, state: once, name: foo }
当你有

- runit:
    name: foo
    state: started
您正在冷却内置模块


关于角色的更多信息我知道,但是
runit:
实际上是角色中提供的一个模块,您可以在任务中使用它。我的
角色:
声明看起来和你的一样。不,
运行它
不是由角色提供的。使用这个角色的唯一方法就是我的写作方式。如果您调用
runit
您正在调用内置
runit
模块我知道我正在调用内置模块。但请查看角色的文档。除了安装runit之外,它还提供了一个可以在任务中使用的模块/命令。这是他们的一个例子。但它早于建筑的到来
- runit:
    name: foo
    state: started