在行动手册中使用Juniper.junos角色的junos_instal_config模块时,例如:
---
- name: Send Set Files to Different Devices
hosts: all
roles:
- Juniper.junos
connection: local
gather_facts: no
tasks:
- name: " Install vMX1 File"
junos_install_config:
host = " {{ inventory_hostname }}"
file = " /home/ubuntu/resources/vMX1.set"
overwrite = false运行攻略将返回以下弃用警告:
[DEPRECATION WARNING]: junos_install_config is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be
removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.然而,在阅读有关该模块的文档时,我似乎找不到替代它的是什么。谁能告诉我现在可以使用哪个模块在更高的版本中发送和安装".set“文件到Junos设备?
发布于 2019-10-04 21:55:07
您可以尝试使用juniper_junos_config模块来推送或检索配置。
tasks:
- name: Load configuration from a local file and commit
juniper_junos_config:
load: "merge"
src: "build_conf/{{ inventory_hostname }}/junos.conf"https://stackoverflow.com/questions/58216466
复制相似问题