我试图运行Ansible模块junos_cli和junos_rollback,我得到以下错误:Ansible - 无法运行某些JUNOS模块
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in '/home/quake/network-ansible/roles/junos-rollback/tasks/main.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: I've made a huge mistake
^here
这是有问题的角色:
---
- name: I've made a huge mistake
junos_rollback:
host={{ inventory_hostname }}
user=ansible
comment={{ comment }}
confirm={{ confirm }}
rollback={{ rollback }}
logfile={{ playbook_dir }}/library/logs/rollback.log
diffs_file={{ playbook_dir }}/configs/{{ inventory_hostname }}
这里是瞻博网页: http://junos-ansible-modules.readthedocs.io/en/1.3.1/junos_rollback.html
他们的例子的语法有点奇怪。主机使用冒号而其余使用=符号。我尝试过混合使用,只使用其中一种。我不断收到错误。
我也证实了我的Junos的eznc版本高于1.2.2(我有2.0.1)
我已经能够前使用junos_cli,我不知道,如果版本不匹配发生。在官方的Ansible文档中,没有提到junos_cli或junos_rollback。也许他们不再支持?
http://docs.ansible.com/ansible/list_of_network_modules.html#junos
谢谢,
上面的示例是由我的操作手册调用的角色。 我也已经安装了Juniper.Junos包: '$ ansible星系安装Juniper.junos - 已安装Juniper.junos,skipping.' 这是什么困惑我。一个月前,我能够使用junos_cli模块,现在我发现模块未找到错误。也许更新Ansible到2.0.2打破了他们?我不知道。 ''' – Quake