Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Automation 提升到特权级别_Automation_Ansible_Cisco Ios - Fatal编程技术网

Automation 提升到特权级别

Automation 提升到特权级别,automation,ansible,cisco-ios,Automation,Ansible,Cisco Ios,当我在GNS3上的Ansible上运行这个时,我得到了这个错误。有人能帮我解决这个错误吗 主机文件 [ios] 172.20.10.55 [ios:vars] ansible_network_os=ios ansible_user=admin ansible_password=cisco ansible_become=yes ansible_become_method=enable 剧本 - name: multiple commands hosts: ios gather_fact

当我在GNS3上的Ansible上运行这个时,我得到了这个错误。有人能帮我解决这个错误吗

主机文件

[ios]
172.20.10.55

[ios:vars]
ansible_network_os=ios
ansible_user=admin
ansible_password=cisco
ansible_become=yes
ansible_become_method=enable
剧本

- name: multiple commands
  hosts: ios
  gather_facts: false
  connection: network_cli
  tasks:
    - name: configure ospf
      ios_config:
        lines:
          - configure terminal
          - 10 pemrit ip host 192.168.1.1 any log
        parents: ip access-list extended test
错误


您需要设置密码


尝试将
ansible\u-been:yes
ansible\u-been\u方法:启用
ansible\u-been\u密码:“{{{ansible\u-been\u-password}}”
添加到
ios\u-config
模块选项中。哦,等等。尝试在您的VAR中设置
ansible\u-been\u-password
。@Jack网络中没有这样的变量ansible\u-been\u-password\u文档说有:奇怪。在这里他们提到了这一点,但在network_cli文档中没有。我会试试看,然后告诉你。谢谢
TASK [configure ospf] **********************************************************
fatal: [172.20.10.55]: FAILED! => {"changed": false, "msg": "unable to elevate privilege to enable mode, at prompt [\nR1>] with error: failed to elevate privilege to enable mode still at prompt [\nR1>]"}

PLAY RECAP *********************************************************************
172.20.10.55               : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0