在剧本中使用角色中的junos_instal_config
模块时,Juniper.junos
例如:
---
- 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
运行 playbook 会返回以下弃用警告:
[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 设备?