使用ansible将配置推送到JUniter设备上
我正在尝试使用ansible将配置推送到juniper设备上。我使用下面的剧本,使用netconf进行连接。我收到错误消息:无法加载配置:ConfigLoadError(严重性:错误,错误元素:设置,消息:错误:语法错误) 我的配置文件包含所有设置的命令 谢谢,现在可以用了。 实际上,我的配置文件是使用set命令的,我所要做的就是使用文件名push.set。还必须在主机下包含用户。 最后一本有效的剧本使用ansible将配置推送到JUniter设备上,ansible,juniper-network-connect,Ansible,Juniper Network Connect,我正在尝试使用ansible将配置推送到juniper设备上。我使用下面的剧本,使用netconf进行连接。我收到错误消息:无法加载配置:ConfigLoadError(严重性:错误,错误元素:设置,消息:错误:语法错误) 我的配置文件包含所有设置的命令 谢谢,现在可以用了。 实际上,我的配置文件是使用set命令的,我所要做的就是使用文件名push.set。还必须在主机下包含用户。 最后一本有效的剧本 --- - hosts: Juniper gather_facts
---
- hosts: Juniper
gather_facts: no
connection: local
roles:
- Juniper.junos
tasks:
- name: Push config
junos_install_config:
host={{ ansible_ssh_host }}
user={{ ansible_user }}
file=push.set
错误消息的意思是配置中有语法错误。
---
- hosts: Juniper
gather_facts: no
connection: local
roles:
- Juniper.junos
tasks:
- name: Push config
junos_install_config:
host={{ ansible_ssh_host }}
user={{ ansible_user }}
file=push.set