AWX 剧本失败 "network os cisco.iosxr.iosxr is not supported"
AWX playbook failing with "network os cisco.iosxr.iosxr is not supported"
我有一个在本地运行得很好的剧本,当我尝试 运行 使用 AWX 时,我 运行 遇到一个错误,似乎表明任务中的设备类型不受支持。
Loading collection ansible.netcommon from /runner/requirements_collections/ansible_collections/ansible/netcommon
Loading callback plugin awx_display of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible_runner/callbacks/awx_display.py
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: soft_reset.yml *******************************************************
Positional arguments: soft_reset.yml
verbosity: 4
remote_user: root
connection: smart
timeout: 10
become: True
become_method: sudo
tags: ('all',)
inventory: ('/runner/inventory/hosts',)
extra_vars: ('@/runner/env/extravars',)
forks: 5
1 plays in soft_reset.yml
PLAY [aggs] ****************************************************************
META: ran handlers
TASK [soft reset bgp peers] ****************************************************
task path: /runner/project/soft_reset.yml:5
fatal: [lab-core-blue]: FAILED! => {
"msg": "network os cisco.iosxr.iosxr is not supported"
}
inventory/hosts.yml
aggs:
hosts:
lab-core-blue:
ansible_host: lab-core-blue.mylab.com
vars:
ansible_network_os: cisco.iosxr.iosxr
ansible_connection: ansible.netcommon.network_cli
soft_reset.yml
- hosts: aggs
gather_facts: no
tasks:
- name: soft reset bgp peers
ansible.netcommon.cli_command:
command: clear bgp vpnv4 unicast {{item}} soft
loop:
- 1.2.3.2
- 1.2.3.3
- 1.2.3.4
collections/requirements.yml
---
collections:
- ansible.netcommon
感谢@sivel 在#ansible irc 中的回答!
I think the AWX EEs only have ansible-core by default, you need cisco.iosxr in that list
原来我需要添加一行到 collections/requirements.yml
---
collections:
- ansible.netcommon
- cisco.iosxr
我有一个在本地运行得很好的剧本,当我尝试 运行 使用 AWX 时,我 运行 遇到一个错误,似乎表明任务中的设备类型不受支持。
Loading collection ansible.netcommon from /runner/requirements_collections/ansible_collections/ansible/netcommon
Loading callback plugin awx_display of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible_runner/callbacks/awx_display.py
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: soft_reset.yml *******************************************************
Positional arguments: soft_reset.yml
verbosity: 4
remote_user: root
connection: smart
timeout: 10
become: True
become_method: sudo
tags: ('all',)
inventory: ('/runner/inventory/hosts',)
extra_vars: ('@/runner/env/extravars',)
forks: 5
1 plays in soft_reset.yml
PLAY [aggs] ****************************************************************
META: ran handlers
TASK [soft reset bgp peers] ****************************************************
task path: /runner/project/soft_reset.yml:5
fatal: [lab-core-blue]: FAILED! => {
"msg": "network os cisco.iosxr.iosxr is not supported"
}
inventory/hosts.yml
aggs:
hosts:
lab-core-blue:
ansible_host: lab-core-blue.mylab.com
vars:
ansible_network_os: cisco.iosxr.iosxr
ansible_connection: ansible.netcommon.network_cli
soft_reset.yml
- hosts: aggs
gather_facts: no
tasks:
- name: soft reset bgp peers
ansible.netcommon.cli_command:
command: clear bgp vpnv4 unicast {{item}} soft
loop:
- 1.2.3.2
- 1.2.3.3
- 1.2.3.4
collections/requirements.yml
---
collections:
- ansible.netcommon
感谢@sivel 在#ansible irc 中的回答!
I think the AWX EEs only have ansible-core by default, you need cisco.iosxr in that list
原来我需要添加一行到 collections/requirements.yml
---
collections:
- ansible.netcommon
- cisco.iosxr