Ansible错误!任务中未检测到任何操作

时间:2017-07-13 15:08:04

标签: python cassandra ansible

我正在尝试制作剧本https://github.com/Datanexus/dn-cassandra

由于列出了不同的部署方案,我将采用此处描述的多节点cassandra设置:deployment scenarios

我已经设置了静态广告资源文件。

cassandra-seed-01 ansible_ssh_host=192.168.0.17 ansible_ssh_port=22 ansible_ssh_user='root' ansible_ssh_private_key_file='keys/id_rsa'
cassandra-seed-02 ansible_ssh_host=192.168.0.18 ansible_ssh_port=22 ansible_ssh_user='root' ansible_ssh_private_key_file='keys/id_rsa'
cassandra-non-seed-01 ansible_ssh_host=192.168.0.22 ansible_ssh_port=22 ansible_ssh_user='root' ansible_ssh_private_key_file='keys/id_rsa'

[cassandra_seed]
192.168.0.17
192.168.0.18

[cassandra]
192.168.0.22

然而,当我尝试运行playbook时,它会抛出以下错误:

  

ERROR!在任务中未检测到任何操作

     

错误似乎已经存在   ' /home/laumair/workspace/dn-cassandra/provision-cassandra.yml' ;: line   21,第9列,但可能在文件的其他位置,具体取决于具体情况   语法问题。

     

违规行似乎是:

  # then, build the seed and non-seed host groups
  - include_role:
    ^ here

我会很感激这个错误的任何方向,因为我已经尝试过类似错误的解决方案但到目前为止没有运气。

1 个答案:

答案 0 :(得分:1)

自Ansible 2.2起,

include_role可用。 请升级您的Ansible安装。