首页 > 解决方案 > 提升到特权级别

问题描述

当我在 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

错误

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

标签: automationansiblecisco-ios

解决方案



推荐阅读